feature: webview without service worker#326333
Open
SimonSiefke wants to merge 15 commits into
Open
Conversation
…ut-service-worker
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in, Electron-only single-iframe webview loader that avoids service workers while retaining the legacy browser path.
Changes:
- Adds proposed API gating and direct webview URI routing.
- Implements Electron protocol handling, resource streaming, CSP transformation, and iframe messaging.
- Adds tests, a manual test extension, and an implementation plan.
Reviewed changes
Copilot reviewed 24 out of 26 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
src/vscode-dts/vscode.proposed.webviewNoServiceWorker.d.ts |
Declares the proposal. |
src/vs/workbench/contrib/webviewView/browser/webviewViewPane.ts |
Enables direct loading for eligible views. |
src/vs/workbench/contrib/webview/test/browser/resourceLoading.test.ts |
Tests direct resource URIs. |
src/vs/workbench/contrib/webview/electron-browser/webviewElement.ts |
Implements the single-iframe loader. |
src/vs/workbench/contrib/webview/common/webview.ts |
Adds direct resource routes. |
src/vs/workbench/contrib/webview/browser/webviewElement.ts |
Adds direct-loader lifecycle hooks. |
src/vs/workbench/contrib/webview/browser/webview.ts |
Extends webview metadata. |
src/vs/workbench/contrib/webview/browser/resourceLoading.ts |
Adds canonical-path validation. |
src/vs/workbench/contrib/webview/browser/overlayWebview.ts |
Propagates resource identifiers. |
src/vs/workbench/api/test/browser/extHostWebview.test.ts |
Tests proposal gating. |
src/vs/workbench/api/common/extHostWebview.ts |
Selects direct routing on desktop. |
src/vs/workbench/api/common/extHost.protocol.ts |
Extends protocol metadata. |
src/vs/workbench/api/common/extHost.api.impl.ts |
Passes UI kind to webviews. |
src/vs/workbench/api/browser/mainThreadWebviews.ts |
Assigns and revives routing data. |
src/vs/platform/webview/electron-main/webviewProtocolProvider.ts |
Serves direct documents and resources. |
src/vs/platform/webview/electron-main/webviewMainService.ts |
Bridges protocol requests over IPC. |
src/vs/platform/webview/common/webviewManagerService.ts |
Defines direct-loader IPC contracts. |
src/vs/platform/extensions/common/extensionsApiProposals.ts |
Registers the proposal. |
src/vs/code/electron-main/app.ts |
Authorizes requests and maps ports. |
src/vs/code/electron-browser/workbench/workbench.html |
Allows the Trusted Types policy. |
src/vs/code/electron-browser/workbench/workbench-dev.html |
Allows the development policy. |
implementation-plan.md |
Documents the design and test plan. |
extensions/webview-no-service-worker/package.json |
Declares the manual test extension. |
extensions/webview-no-service-worker/media/style.css |
Styles its test webview. |
extensions/webview-no-service-worker/media/image.svg |
Adds its test image. |
extensions/webview-no-service-worker/extension.js |
Implements the test panel. |
…hout-service-worker-minimal
SimonSiefke
marked this pull request as ready for review
July 17, 2026 15:08
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @deepak1556Matched files:
|
…ut-service-worker-minimal # Conflicts: # src/vs/workbench/contrib/webview/browser/pre/index.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #326331