提交 78f8a0ba 编写于 作者: M Matt Bierner

Extract doUpdateContent

上级 2bfd4ce2
......@@ -552,20 +552,12 @@ export class WebviewElement extends Disposable implements Webview {
}
this._contentOptions = value;
this._send('content', {
contents: this._contents,
options: this._contentOptions,
state: this._state
});
this.doUpdateContent();
}
public set contents(value: string) {
this._contents = value;
this._send('content', {
contents: value,
options: this._contentOptions,
state: this._state
});
this.doUpdateContent();
}
public update(value: string, options: WebviewContentOptions, retainContextWhenHidden: boolean) {
......@@ -574,6 +566,10 @@ export class WebviewElement extends Disposable implements Webview {
}
this._contents = value;
this._contentOptions = options;
this.doUpdateContent();
}
private doUpdateContent() {
this._send('content', {
contents: this._contents,
options: this._contentOptions,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册