Forward onEdit from webviewEditor to mainthread

This commit is contained in:
Matt Bierner
2019-11-07 14:53:13 -08:00
parent c3bf29295c
commit bca7206f59
3 changed files with 36 additions and 13 deletions

View File

@@ -296,6 +296,13 @@ export class MainThreadWebviews extends Disposable implements extHostProtocol.Ma
this._editorProviders.delete(viewType);
}
public $onEdit(handle: extHostProtocol.WebviewPanelHandle, editJson: string): void {
const webview = this.getWebviewInput(handle);
if (!(webview instanceof CustomFileEditorInput)) {
throw new Error(`Webview is not a webview editor`);
}
}
private hookupWebviewEventDelegate(handle: extHostProtocol.WebviewPanelHandle, input: WebviewInput) {
input.webview.onDidClickLink((uri: URI) => this.onDidClickLink(handle, uri));
input.webview.onMessage((message: any) => this._proxy.$onMessage(handle, message));