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 <piotrpdev@gmail.com>

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

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

Co-authored-by: Piotr Płaczek <piotrpdev@gmail.com>

* docs: deprecate some protocol methods

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

Co-authored-by: Piotr Płaczek <piotrpdev@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Piotr Płaczek <piotrpdev@gmail.com>
This commit is contained in:
trop[bot] 2024-08-06 09:35:43 -07:00 committed by GitHub
parent 10a8c258cb
commit 13a799381f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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