BrowserView is deprecated in Electron>=29 #1025

Open
opened 2026-01-29 16:55:32 +00:00 by claunia · 5 comments
Owner

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.

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.
claunia added the help wantedapidiscussion labels 2026-01-29 16:55:32 +00:00
Author
Owner

@FlorianRappl commented on GitHub (Dec 4, 2025):

In my opinion this depends. If we want to still support versions that do not have WebContentsView we 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).

@FlorianRappl commented on GitHub (Dec 4, 2025): In my opinion this depends. If we want to still support versions that do not have `WebContentsView` we 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).
Author
Owner

@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.

@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.
Author
Owner

@softworkz commented on GitHub (Dec 4, 2025):

From my point of view, this is very simple:

  • We need to have the new one
    (it's the way forward, there's no really a choice)
  • And we cannot drop the old one
    (would break things for Electron.NET users - they should be able to make their own decisions when to migrate)
@softworkz commented on GitHub (Dec 4, 2025): From my point of view, this is very simple: - **We need to have the new one** (it's the way forward, there's no really a choice) - **And we cannot drop the old one** (would break things for Electron.NET users - they should be able to make their own decisions when to migrate)
Author
Owner

@AeonSake commented on GitHub (Dec 4, 2025):

This could probably be solved with a custom analyzer and attribute on the old BrowserView class/property that would warn (or potentially throw an error) on compile, depending on the electron version that is selected.

@AeonSake commented on GitHub (Dec 4, 2025): This could probably be solved with a custom analyzer and attribute on the old `BrowserView` class/property that would warn (or potentially throw an error) on compile, depending on the electron version that is selected.
Author
Owner

@agracio commented on GitHub (Dec 4, 2025):

While I was implementing WebContents methods did notice that BrowserView is used in other code like IpcMain, WindowManager and possibly more.
Do not think it will be an easy switch.

@agracio commented on GitHub (Dec 4, 2025): While I was implementing `WebContents` methods did notice that BrowserView is used in other code like IpcMain, WindowManager and possibly more. Do not think it will be an easy switch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#1025