Skip to content

Commit b853b04

Browse files
Fix loading webview resources
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 3b5d7d0 commit b853b04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • code/src/vs/workbench/contrib/webview/browser/pre

code/src/vs/workbench/contrib/webview/browser/pre/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@
238238
return reject(new Error('Service Workers are not enabled. Webviews will not work. Try disabling private/incognito mode.'));
239239
}
240240

241-
const swPath = encodeURI(`service-worker.js?v=${expectedWorkerVersion}&vscode-resource-base-authority=${searchParams.get('vscode-resource-base-authority')}&remoteAuthority=${searchParams.get('remoteAuthority') ?? ''}`);
242-
navigator.serviceWorker.register(swPath, { type: 'module' })
241+
const swPath = encodeURI(`service-worker.js?v=${expectedWorkerVersion}&vscode-resource-base-authority=${searchParams.get('vscode-resource-base-authority')}&id=${ID}&remoteAuthority=${searchParams.get('remoteAuthority') ?? ''}`);
242+
navigator.serviceWorker.register(swPath)
243243
.then(async registration => {
244244
/**
245245
* @param {MessageEvent} event

0 commit comments

Comments
 (0)