Created
October 14, 2020 17:59
-
-
Save ljmotta/1928ca814d89b2ee8d3af3b81c60cc7b to your computer and use it in GitHub Desktop.
TodoListWebview Envelope Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public open(pageId: string, opts: { onClose: () => void }) { | |
// ... | |
const envelopeServer: EnvelopeServer<TodoListChannelApi, TodoListEnvelopeApi> = new EnvelopeServer( | |
{ postMessage: (message) => webviewPanel.webview.postMessage(message) }, | |
this.envelopeLocator.targetOrigin, | |
() => | |
envelopeServer.manager.clientApi.requests.todoList__init( | |
{ origin: envelopeServer.origin, envelopeServerId: envelopeServer.id }, | |
{ user: "Tiago" } | |
) | |
); | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment