chore: formally deprecate crashed and renderer-process-crashed events (#40089)

This commit is contained in:
Milan Burda 2023-10-11 01:49:01 +02:00 committed by GitHub
parent c892c61b90
commit 3e70692e4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,34 @@ console.log(app.runningUnderRosettaTranslation)
console.log(app.runningUnderARM64Translation) 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 `<webview>`
The `crashed` events on `WebContents` and `<webview>` 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) ## Planned Breaking API Changes (27.0)
### Removed: macOS 10.13 / 10.14 support ### Removed: macOS 10.13 / 10.14 support