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
The fate of BrowserView #10622
Comments
I don't think so. Out of curiosity, do you recall any details from the murmurs? |
Chromium 61 lands OOPIF (actually its already available behind a flag), its an architectural change in how webview works. We need to implement it in Electron and its quite some work. I don't think we would want to deprecate BrowserView for it. |
No I don't have any details; just heard people talking about it in passing. Apparently Slack is using BrowserView but they think they'll be able to switch back to webviews in Chromium 61. |
I'm going to have to disagree with any plans (on Slack's end) to switch back to webview (at least anytime soon). Admittedly we haven't shipped our release with |
For the rest of us mortals is there a summary (bullet point is fine) of why/when BrowserView should be used over BrowserWindow? Top 3-5 list would do the job, a when and when not to use.. I am building an app which uses a lot of webview and am finding issues that maybe can be worked around or just tolerated for the time being, and have no idea if BrowserView would address them. For example, if this still applies then BrowserView is pretty useless to me: #10323 (one BrowserView per BrowserWindow) Thanks |
https://www.chromium.org/developers/design-documents/oop-iframes "It is worth noting that the implementation is being migrated to work on top of the new OOPIF infrastructure." |
@TimNZ That "one per window" rule still applies. In general, WebViews are embedded into your DOM (using browser plugin architecture). BrowserViews on the other hand are simply another renderer glued on top of your existing window. They come with different issues. WebViews are part of the whole ecosystem and easier to work with, but any bugs will be low-level. We've found issues with navigation, rendering, and composition. All in small fractions of our overall userbase, but enough to go with BrowserViews. They are primitive and dumb, tough to work with, and unforgiving when it comes to cooperation with the underlying window. |
@TimNZ this would be great. In the absence of such a list, this article by @poiru may help shed some light on the differences: https://blog.figma.com/introducing-browserview-for-electron-7b40b4b493d5 |
Thanks @zeke @felixrieseberg, helpful. I am building a 'browser' so using a lot of simultaneous webview in a BrowserWindow. Brave managed to build a high usage product around webview (Muon) so I have to presume they either found no major blockers, or did their own minor fixes. Likely tradeoffs that don't affect me badly, but were enough of an issue for Figma to build BrowserView. |
The new Slack beta is basically a complete rewrite of their Electron app to jump from WebView to BrowserView https://slack.engineering/growing-pains-migrating-slacks-desktop-app-to-browserview-2759690d9c7b |
@CharlieHess, I asked a question on the medium post: Can we get more insights into what it would take to replace webview with BrowserView and top drivers/issues? I am writing a browser replacement, so has Brave (with Muon), Station (getstation.com), and others. Thanks for any guidance you can provide. |
Implementing #10323 would be amazing. Without that one limitation of BrowserView is that you can't implement findInPage UI wherever you like. Right now if you put an input in the BrowserView and call findInPage the input text is also highlighted, so you're restricted to putting the UI outside of the BrowserView or putting it in a child window. |
That would be very nice, I', using 4 webview tags in 1 browser window und would like to change it doe BrowserView. |
I've been trying out BrowserView for one of the projects I'm working on. One of the drawbacks, at least as far as I can tell, is that you can't layer anything on top of a BrowserView. For instance, if you have a dropdown menu in the BrowserWindow which hosts the BrowserView, you can't layer that menu on top of the BrowserView. I see that #9166 mentions adding z-ordering. That would be a killer feature. I wonder if anyone is working on it... |
7/30/18 a warning https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#warning added to the
Correspondent pull request: #13835 So right now, it' oposite, Electron team is recommending to use |
I just read the warning in the docs on webview and the associated PR (#13835). When do these big architectural changes to webview land in Chrome? Is there a rough idea on when webviews will be deprecated (as mentioned in that PR)? |
There are some news?It is possible to have more than 1 BrowserView in a BrowserWindow? |
As of right now, no. If you try loading two BrowserViews in the same BrowserWindow, only your last called BrowserView will appear, meaning in this case your first BrowserView will not show up but your second one will. |
You can in fact load more than one |
any idea how to show the first BrowserView ? |
Thanks for reaching out! The issues tracker is used for feature requests and bug reports, so you will probably have better luck with this question at one of the links at the project's Community page -- in particular, be sure to give the Electron Discord server a try. I hope this helps! |
I heard some murmurs at our recent Tokyo mini-summit that an upcoming version of Chrome will address whatever problems Electron's BrowserView API was created to solve. Is it Chromium 61? Does that mean that we should deprecate BrowserView when Chromium 61 lands in Electron?
cc @electron/browserview @poiru @felixrieseberg
The text was updated successfully, but these errors were encountered: