mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
BrowserView is deprecated in Electron>=29 #1025
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @agracio on GitHub (Dec 4, 2025).
According to Electron API docs BrowserView was deprecated in version 29 in favour of WebContentsView.
BrowserView: https://www.electronjs.org/docs/latest/api/browser-view
WebContentsView: https://www.electronjs.org/docs/latest/api/web-contents-view
It is worth looking at this to make sure that API is still relevant and working and add a new one as well.
@FlorianRappl commented on GitHub (Dec 4, 2025):
In my opinion this depends. If we want to still support versions that do not have
WebContentsViewwe should stick to the deprecated one (or have both - but I think this would be too costly in terms of maintenance). Otherwise, I'd say let's go for the new one. I'm open for both options (I'd even argue that it would be good to remove that old cruft and use this to well-define a minimum version of Electron that is supported by Electron.NET).@agracio commented on GitHub (Dec 4, 2025):
I would also suggest to use new API since it is not known how long the old one will be kept in Electron. It has been 10 versions and it is still present but we cannot take it for granted.
@softworkz commented on GitHub (Dec 4, 2025):
From my point of view, this is very simple:
(it's the way forward, there's no really a choice)
(would break things for Electron.NET users - they should be able to make their own decisions when to migrate)
@AeonSake commented on GitHub (Dec 4, 2025):
This could probably be solved with a custom analyzer and attribute on the old
BrowserViewclass/property that would warn (or potentially throw an error) on compile, depending on the electron version that is selected.@agracio commented on GitHub (Dec 4, 2025):
While I was implementing
WebContentsmethods did notice that BrowserView is used in other code like IpcMain, WindowManager and possibly more.Do not think it will be an easy switch.