Last active
October 14, 2020 18:05
-
-
Save ljmotta/3994ef8cf5f925b23e8aeb7ea5f6dbc1 to your computer and use it in GitHub Desktop.
TodoListWebview subscriptions
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 }) { | |
// ... | |
this.context.subscriptions.push( | |
webviewPanel.webview.onDidReceiveMessage( | |
(msg) => envelopeServer.receive(msg, this.api), | |
webviewPanel.webview, | |
this.context.subscriptions | |
) | |
); | |
webviewPanel.onDidDispose( | |
() => { | |
envelopeServer.stopInitPolling(); | |
opts.onClose(); | |
}, | |
webviewPanel.webview, | |
this.context.subscriptions | |
); | |
envelopeServer.startInitPolling(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment