-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
complete support of webviews #6465
Conversation
b504bc6
to
838c71d
Compare
2f86eed
to
f2660f8
Compare
@BroKun @amiramw @502647092 Could you check please how well this PR works for your webviews? Also whether you have any issues with running it on windows (if it is applicable to your case). |
49b3be2
to
64e13c4
Compare
@marcdumais-work I had to copy webview iframe code from 1.40.0 version. It is not available in previous versions. CQ: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21051 |
64e13c4
to
ec3e9f0
Compare
@olexii4 @benoitf Could you point please to theia plugins contributing webview for testing? Important difference in this PR that it switches to vscode way of styling webviews, i.e. https://code.visualstudio.com/api/extension-guides/webview#theming-webview-content |
A CQ was already approved: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=21051#c3 🏎 |
5cd1432
to
730158f
Compare
Merging, please file issues to ask for help. From my experience for last weeks, webview is not trivial thing from user (especially to make it work remotely with localhost services) and implementation perspectives. |
Thanks for your hard work on this feature @akosyakov ! |
|
||
protected async resolveCache(): Promise<void> { | ||
try { | ||
this.cache.resolve(await caches.open('webview:v1')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Where should 'caches' be defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question - I didn't know either so I opened this file in Gitpod and using "Peek Definition" from the context menu, over that symbol, I found it's from the DOM API:
So this is implemented in/by your web browser. Hope this help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s a browser API. It’s not available over http, webviews work only over https or localhost for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, but maybe prefixing such variables like window.caches
would help readers?
@akosyakov I was just doing some testing on GitPod (so I don't know if this PR is deployed there), but calling I don't know if it's just because there are undeployed changes, or if this is something that isn't done yet. |
@DanTup this PR was not deployed in Gitpod yet, I think Gitpod is targeting next week to get it there cc @svenefftinge
yes, it is how it's implemented:
|
Ah great - I did look through the code but couldn't find the implementation. Thanks! |
What it does
vscode.previewHTML
command is removed--theia
prefix is supported as wellHow to test
Use following VS Code extensions:
Review checklist
Reminder for reviewers