-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Embedding <webview> tags within eachother #1130
Comments
I don't think that's possible. Try using an iframe instead. |
My use case involves using a webview to display a website which injects content into its own webview, so an iframe wouldn't work. |
Currently |
Is this going to be implemented? |
Would love to have this as well. Or at least for local content :-) |
+1 |
I'm an author of kiosk software that's built on Electron. Nesting webviews would make my face happy! |
Please don't add support for nesting without adding a BrowserWindow option to enable/disable it. I rely on it to prevent rogue external websites inserting their own tags and inserting nasty preload scripts. |
+1 |
Hi, Does this nested web view feature implemented in electron. Thanks |
What's the status of this? |
This would be very nice :) |
OK, have have a sort of solution/workaround that allows you to do this. I have attached my packed version of this if you would like to use it (it was from release 1.6.2). Hope this helps, |
+1 @zcbenz any progress towards this or is it a wontfix? |
Any update or solution for this? |
I don't think anyone is working on this, but we are happy to accept pull requests that implement this. |
Is anyone aware of why it doesn't work? As I have found, if you remove the |
Yes removing |
I tried that solution, but getting error when i try to quit my app:
Using Electron 1.7.8 |
Any updates on this issue |
What is the status of this issue? |
The code has moved from // Don't allow recursive `<webview>`.
if (webviewTag && guestInstanceId == null) {
// setup the webview
} But, now removing the check for // shell/common/api/atom_api_command_line.cc
base::CommandLine::ForCurrentProcess()->HasSwitch(name.c_str()); @miniak Is this expected behavior? |
@highco @miniak index.html <webview src="file:///embedded.html" webpreferences="webviewTag"></webview> embedded.html <h1>github</h1>
<webview src="http://github.com"></webview> |
Need this feature desperately, Please!!! |
When will this feature get integrated? |
If this is considered, a nested BrowserView would be nice for my use case |
Is a fix for this issue even possible in the near future? |
I use electron-tabs - it uses webview for each tab |
I want this feature too. |
Hi, I compiled electron from source (after commenting home.html
preload.js
when i scroll the deepest webview content a few times, it crashes with the following errors.
What am i missing here? any help is appreciated. |
@pragalathanm You're missing all the C++ code to allow nested webviews. To show webview inside another webview (or iframe, or frameset) there has to be a specification of security context, threading model (tabs/iframes/webviews from a same domain sometimes run in the same process) and lots of other stuff. AFAIK neither of it was implemented in Chrome, because it doesn't use nested webviews. |
i see. thanks @polkovnikov-ph for the clarification. i am developing a tool which collates 2-3 websites/pages in one application. At present all these pages are rendered as webviews. Also this tool need to enhance some of those pages by embedding other pages into their dom. But this is not working due to the unavailability nested webview. Any alternative solution that you can suggest? Interestingly i was going through web and found this https://hackernoon.com/why-i-prefer-nw-js-over-electron-2018-comparison-e60b7289752 where it states nested webview is supported in NWjs. Havent tested it yet. |
index.html
embedded.html
Would it be possible to have
index.html
render the header and webview ofembedded.html
? I don't seem to currently be able to do this.The text was updated successfully, but these errors were encountered: