Skip to content

Commit 4f30fd5

Browse files
authored
Fix webview state update (microsoft#166048)
Fixes microsoft#165590 Added wrong typings here
1 parent 615fd70 commit 4f30fd5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/vs/workbench/contrib/webview/browser/webviewElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class WebviewElement extends Disposable implements IWebview, WebviewFindD
258258
this.reload();
259259
}));
260260

261-
this._register(this.on('do-update-state', ({ state }) => {
261+
this._register(this.on('do-update-state', (state) => {
262262
this.state = state;
263263
this._onDidUpdateState.fire(state);
264264
}));

src/vs/workbench/contrib/webview/browser/webviewMessages.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type FromWebviewMessage = {
2525
'did-blur': void;
2626
'did-load': void;
2727
'did-find': { didFind: boolean };
28-
'do-update-state': { state: any };
28+
'do-update-state': string;
2929
'do-reload': void;
3030
'load-resource': { id: number; path: string; query: string; scheme: string; authority: string; ifNoneMatch?: string };
3131
'load-localhost': { id: string; origin: string };
@@ -71,7 +71,7 @@ export type ToWebviewMessage = {
7171
themeId: string;
7272
themeLabel: string;
7373
reduceMotion: boolean;
74-
screenReader: boolean;
74+
screenReader: boolean;
7575
};
7676
'find': { value: string; previous?: boolean };
7777
'find-stop': { clearSelection?: boolean };

0 commit comments

Comments
 (0)