mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Use service workers for loading webview resources on desktop (#120654)
This switches us from using a custom protocol to using a service worker to load resources inside webviews. Previously we had only been using service workers on web (since custom protocols are not supported on web). The service worker based approach is much cleaner to than our custom protocol work and lets us avoid some extra roundtrips between the main process and the renderer We were previously blocked from using service workers on desktop due to an electron issue. However this has now been resolved
This commit is contained in:
@@ -186,7 +186,7 @@ export class CodeApplication extends Disposable {
|
||||
|
||||
const uri = URI.parse(source);
|
||||
if (uri.scheme === Schemas.vscodeWebview) {
|
||||
return uri.path === '/index.html' || uri.path === '/electron-browser/index.html';
|
||||
return uri.path === '/index.html' || uri.path === '/electron-browser-index.html';
|
||||
}
|
||||
|
||||
const srcUri = uri.fsPath.toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user