зеркало из https://github.com/electron/electron.git
docs: add missing deprecations to `breaking-changes.md` (#43217)
* docs: deprecate `BrowserView` Reference: https://github.com/electron/electron/pull/35658 * docs: deprecate `webContents.goToIndex(index)` Reference: https://github.com/electron/electron/pull/41752/files#diff-18ed6a5b5a9084c976509502962b7f05989a8bd13a2ba3dc02868056938c03b6R1165-R1167 * docs: deprecate some protocol methods Reference: https://github.com/electron/electron/pull/36674/files#diff-74861ecada868821b139e79f244ea32b840a93f60de572d585117a0ff8d165c8R380
This commit is contained in:
Родитель
29fd2d343b
Коммит
f42331f277
|
@ -65,7 +65,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.
|
||||
|
||||
|
@ -78,6 +78,7 @@ win.webContents.canGoBack()
|
|||
win.webContents.goBack()
|
||||
win.webContents.canGoForward()
|
||||
win.webContents.goForward()
|
||||
win.webContents.goToIndex(index)
|
||||
win.webContents.canGoToOffset()
|
||||
win.webContents.goToOffset(index)
|
||||
|
||||
|
@ -136,6 +137,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`
|
||||
|
@ -463,7 +482,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).
|
||||
|
|
Загрузка…
Ссылка в новой задаче