* Use non-deprecated API version
* Prototype: enable offline iframe based webviews on desktop
Adds a new `vscode-webview` protocol for loading the wrapper contents of a webview
Still needs cleaning up
* fix loading of electron webview
* Cleanup and add `webview.experimental.useIframes` setting
Co-authored-by: deepak1556 <hop2deep@gmail.com>
* debug: allow debugging the renderer process
This adds a new parameter to the `launchVSCode` request --
`debugRenderer`. If set to true and we're in Electron, the main process
will attempt to stand up a CDP-speaking server and respond with the port
the debugger can connect to in order to handle debug events.
Note: this only works when webviews are iframe-based. It's _possible_
to do the same treatment to webviews with greater complexity. I didn't
implement that today, and maybe we say since iframes are coming
eventually (and they can be toggled on with a user setting that we could
have in the starter...) we don't need do add handling for that.
This does not work when debugging in web because there's no way to
force the browser to enter debug mode.
Code in this PR is still rough, I will keep this in PR until
I have js-debug working end to end and iron out any kinks.
* fixup! adopt new api
* webviews: add 'purpose' flag and extension ID to iframe webview uri
The `purpose` can be used for notebooks instead of the extension ID,
since there's no extension associated with the renderer view.
The renderer URL now looks like:
```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=&purpose=notebookRenderer
```
And a renderer is:
```
https://<guid>.vscode-webview-test.com/<random>/index.html?id=<guid>&extensionId=connor4312.vsix-viewer&purpose=undefined
```
I wanted to put this in the page title, but unfortunately this is hard
due to https://bugs.chromium.org/p/chromium/issues/detail?id=1058108.
Instead, add it to the url which _is_ available and given in
the first targetInfoChanged event.
Co-authored-by: Andre Weinand <aweinand@microsoft.com>