Browse Source

docs: add missing deprecations to `breaking-changes.md` (#43228)

* docs: deprecate `BrowserView`

Reference: https://github.com/electron/electron/pull/35658

Co-authored-by: Piotr Płaczek <[email protected]>

* docs: deprecate `webContents.goToIndex(index)`

Reference: https://github.com/electron/electron/pull/41752/files#diff-18ed6a5b5a9084c976509502962b7f05989a8bd13a2ba3dc02868056938c03b6R1165-R1167

Co-authored-by: Piotr Płaczek <[email protected]>

* docs: deprecate some protocol methods

Reference: https://github.com/electron/electron/pull/36674/files#diff-74861ecada868821b139e79f244ea32b840a93f60de572d585117a0ff8d165c8R380

Co-authored-by: Piotr Płaczek <[email protected]>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Piotr Płaczek <[email protected]>
trop[bot] 8 months ago
parent
commit
13a799381f
1 changed files with 21 additions and 2 deletions
  1. 21 2
      docs/breaking-changes.md

+ 21 - 2
docs/breaking-changes.md

@@ -58,7 +58,7 @@ contextBridge.exposeInMainWorld('electron', {
 })
 ```
 
-### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `canGoToOffset`, `goToOffset` on `WebContents`
+### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `goToIndex`, `canGoToOffset`, `goToOffset` on `WebContents`
 
 The navigation-related APIs are now deprecated.
 
@@ -71,6 +71,7 @@ win.webContents.canGoBack()
 win.webContents.goBack()
 win.webContents.canGoForward()
 win.webContents.goForward()
+win.webContents.goToIndex(index)
 win.webContents.canGoToOffset()
 win.webContents.goToOffset(index)
 
@@ -129,6 +130,24 @@ The autoresizing behavior is now standardized across all platforms.
 If your app uses `BrowserView.setAutoResize` to do anything more complex than making a BrowserView fill the entire window, it's likely you already had custom logic in place to handle this difference in behavior on macOS.
 If so, that logic will no longer be needed in Electron 30 as autoresizing behavior is consistent.
 
+### Deprecated: `BrowserView`
+
+The [`BrowserView`](./api/browser-view.md) class has been deprecated and
+replaced by the new [`WebContentsView`](./api/web-contents-view.md) class.
+
+`BrowserView` related methods in [`BrowserWindow`](./api/browser-window.md) have
+also been deprecated:
+
+```js
+BrowserWindow.fromBrowserView(browserView)
+win.setBrowserView(browserView)
+win.getBrowserView()
+win.addBrowserView(browserView)
+win.removeBrowserView(browserView)
+win.setTopBrowserView(browserView)
+win.getBrowserViews()
+```
+
 ### Removed: `params.inputFormType` property on `context-menu` on `WebContents`
 
 The `inputFormType` property of the params object in the `context-menu`
@@ -456,7 +475,7 @@ systemPreferences.getColor('selected-content-background')
 
 ## Planned Breaking API Changes (25.0)
 
-### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
+### Deprecated: `protocol.{un,}{register,intercept}{Buffer,String,Stream,File,Http}Protocol` and `protocol.isProtocol{Registered,Intercepted}`
 
 The `protocol.register*Protocol` and `protocol.intercept*Protocol` methods have
 been replaced with [`protocol.handle`](api/protocol.md#protocolhandlescheme-handler).