Skip to content

Commit 7e87a08

Browse files
authored
Use a unique authority for desktop webview too (microsoft#138529)
Fixes microsoft#138409 This fix changes webviews on desktop to always use a unique authority instead of reusing the id passed in. In practice, this change should only effect internal webviews, such as those on extension pages or in getting started, since those were the only webviews that were using a hardcoded id This aligns webviews on desktop with web.
1 parent 022e0ab commit 7e87a08

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace WebviewState {
9595
export class WebviewElement extends Disposable implements IWebview, WebviewFindDelegate {
9696

9797
public readonly id: string;
98-
private readonly iframeId: string;
98+
protected readonly iframeId: string;
9999

100100
protected get platform(): string { return 'browser'; }
101101

src/vs/workbench/contrib/webview/electron-sandbox/webviewElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class ElectronWebviewElement extends WebviewElement {
9191
}
9292

9393
protected override get webviewContentEndpoint(): string {
94-
return `${Schemas.vscodeWebview}://${this.id}`;
94+
return `${Schemas.vscodeWebview}://${this.iframeId}`;
9595
}
9696

9797
/**

0 commit comments

Comments
 (0)