Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple browser extension #109276

Merged
merged 5 commits into from
Jan 5, 2021
Merged

Add simple browser extension #109276

merged 5 commits into from
Jan 5, 2021

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Oct 24, 2020

This change adds a new 'simple browser' extension. This extension uses a webview to render webpages directly in VS Code. We plan on using it for optionally previewing local servers in both desktop and codespaces

The browser itself has a number of limitations due to the security around iframes:

  • It traps keyboard focus
  • We can't detect if a page fails to load
  • We can't track the current url of the iframe

@mjbvz mjbvz self-assigned this Oct 24, 2020
@gjsjohnmurray
Copy link
Contributor

Will the target page be able to display its modal messages, eg window.alert(...)? And any authentication dialog it may require?

I am asking because I have seen webview issues here on GH that seem to indicate those types of user interaction aren't allowed.

@mjbvz
Copy link
Collaborator Author

mjbvz commented Nov 2, 2020

@gjsjohnmurray No, this uses standard webviews so it has the same sandboxing/limitations. it is not intended to be used as a proper browser so much as previewing pages from a locally running server

mjbvz added 5 commits January 4, 2021 18:30
This change adds a new 'simple browser' extension. This extension uses a webview to render webpages directly in VS Code. We plan on using it for optionally previewing local servers in both desktop and codespaces

The browser itself has a number of limitations due to the security around iframes:

- It traps keyboard focus
- We can't detect if a page fails to load
- We can't track the current url of the iframe
@mjbvz mjbvz marked this pull request as ready for review January 5, 2021 03:05
@mjbvz mjbvz added this to the January 2021 milestone Jan 5, 2021
@mjbvz mjbvz force-pushed the dev/mjbvz/simple-browser branch from c08125e to 78c32bc Compare January 5, 2021 03:05
@mjbvz
Copy link
Collaborator Author

mjbvz commented Jan 5, 2021

Merging in, although this feature is still experimental

You can set simpleBrowser.opener.enabled to enable opening http and https links in the simple browser

@mjbvz mjbvz merged commit 3ed300e into master Jan 5, 2021
@mjbvz mjbvz deleted the dev/mjbvz/simple-browser branch January 5, 2021 03:06
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants