From 3e70692e4b3044a10e5b1e5148a97a3f62bec4cb Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Wed, 11 Oct 2023 01:49:01 +0200 Subject: [PATCH] chore: formally deprecate `crashed` and `renderer-process-crashed` events (#40089) --- docs/breaking-changes.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index 92192ae54d..b2a58552d9 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -75,6 +75,34 @@ console.log(app.runningUnderRosettaTranslation) console.log(app.runningUnderARM64Translation) ``` +### Deprecated: `renderer-process-crashed` event on `app` + +The `renderer-process-crashed` event on `app` has been deprecated. +Use the new `render-process-gone` event instead. + +```js +// Deprecated +app.on('renderer-process-crashed', (event, webContents, killed) => { /* ... */ }) + +// Replace with +app.on('render-process-gone', (event, webContents, details) => { /* ... */ }) +``` + +### Deprecated: `crashed` event on `WebContents` and `` + +The `crashed` events on `WebContents` and `` have been deprecated. +Use the new `render-process-gone` event instead. + +```js +// Deprecated +win.webContents.on('crashed', (event, killed) => { /* ... */ }) +webview.addEventListener('crashed', (event) => { /* ... */ }) + +// Replace with +win.webContents.on('render-process-gone', (event, details) => { /* ... */ }) +webview.addEventListener('render-process-gone', (event) => { /* ... */ }) +``` + ## Planned Breaking API Changes (27.0) ### Removed: macOS 10.13 / 10.14 support