diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 93ac2b2f3721..fd2d63aacdac 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -313,6 +313,45 @@ you should plan to update your native modules to be context aware. For more detailed information see [#18397](https://github.com/electron/electron/issues/18397). +### Deprecated: `BrowserWindow` extension APIs + +The following extension APIs have been deprecated: +* `BrowserWindow.addExtension(path)` +* `BrowserWindow.addDevToolsExtension(path)` +* `BrowserWindow.removeExtension(name)` +* `BrowserWindow.removeDevToolsExtension(name)` +* `BrowserWindow.getExtensions()` +* `BrowserWindow.getDevToolsExtensions()` + +Use the session APIs instead: +* `ses.loadExtension(path)` +* `ses.removeExtension(extension_id)` +* `ses.getAllExtensions()` + +```js +// Deprecated in Electron 9 +BrowserWindow.addExtension(path) +BrowserWindow.addDevToolsExtension(path) +// Replace with +session.defaultSession.loadExtension(path) +``` + +```js +// Deprecated in Electron 9 +BrowserWindow.removeExtension(name) +BrowserWindow.removeDevToolsExtension(name) +// Replace with +session.defaultSession.removeExtension(extension_id) +``` + +```js +// Deprecated in Electron 9 +BrowserWindow.getExtensions() +BrowserWindow.getDevToolsExtensions() +// Replace with +session.defaultSession.getAllExtensions() +``` + ### Removed: `.getWebContents()` This API, which was deprecated in Electron 8.0, is now removed.