-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Description
Today VS Code implements the webview api on desktops using electron's <webview>
tag. We've run into some unexpected behavior with webviews and would prefer to move to a more standard web based approach, such as using iframes
For web, we already implement webviews using normal iframes. You can also enable experimental iframe based webviews in desktop VS Code by setting "webview.experimental.useIframes": true
("webview.experimental.useExternalEndpoint": true
in older VS Code versions)
Known blockers:
-
We probably want to use an electron custom-protocol to host the webview content itself. However we cannot register a service worker inside pages served up using a custom protocol: Cannot use service worker in html document served from custom protocol: The document is in an invalid state. electron/electron#20248
-
Find does not work for for iframe based webviews. There is no clear way to implement the find functionality for webviews without taking a dependency on a third party html search library