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

Ship vs loader in notebok webview in Web #95560

Closed
rebornix opened this issue Apr 17, 2020 · 3 comments
Closed

Ship vs loader in notebok webview in Web #95560

rebornix opened this issue Apr 17, 2020 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality notebook on-testplan web Issues related to running VSCode in the web
Milestone

Comments

@rebornix
Copy link
Member

Issue Type: Feature Request

Webviews in web are iframes hosted on azure websites which is not in the same origin as the vscode web, so it can't access modules from vscode in the same way as running in Desktop. In notebook, we are using vs/loader.js as the builtin AMD loader in the webview, to make it work in Web, IMHO we need to bundle vs/loader.js together with other webview resources (main.js, pre.js, etc).

VS Code version: Code - Insiders 1.45.0-insider (a3083e5, 2020-04-17T08:08:39.508Z)
OS version: Darwin x64 19.2.0

@rebornix rebornix added the feature-request Request for new features or functionality label Apr 17, 2020
@rebornix rebornix added notebook web Issues related to running VSCode in the web labels Apr 17, 2020
@rebornix rebornix added this to the April 2020 milestone Apr 17, 2020
@rebornix
Copy link
Member Author

@mjbvz does this make sense?

@mjbvz
Copy link
Collaborator

mjbvz commented Apr 17, 2020

Sure. Here's the script that publishes the webview assets: https://github.com/microsoft/vscode/blob/8065712528e697a85a7d1ee4739530c0f8aae1b9/build/azure-pipelines/common/publish-webview.sh

The other (simpler) option is to inline the script

@rebornix
Copy link
Member Author

@mjbvz inlining the script is actually the right fix. Bundling loader.js with main.js doesn't fix the issue as the webview content is in the inner iframe, which will not have access to the loader script.

@rebornix rebornix changed the title Ship vs loader in webview bundle for web Ship vs loader in notebok webview in Web Apr 20, 2020
@rebornix rebornix added verification-needed Verification of issue is requested on-testplan and removed verification-needed Verification of issue is requested labels Apr 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook on-testplan web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

2 participants