fix: beforeunload and unload firing in BrowserViews (#28382)
* fix: beforeunload and unload firing in BrowserViews * Ensure UserGesture is sent for BV webContents * spec: add tests * refactor: clean up logic * spec: fixup specs * docs: document event behavior for BrowserViews
This commit is contained in:
parent
e454bded3c
commit
7d04f729d8
4 changed files with 56 additions and 9 deletions
|
@ -375,6 +375,8 @@ win.webContents.on('will-prevent-unload', (event) => {
|
|||
})
|
||||
```
|
||||
|
||||
**Note:** This will be emitted for `BrowserViews` but will _not_ be respected - this is because we have chosen not to tie the `BrowserView` lifecycle to its owning BrowserWindow should one exist per the [specification](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).
|
||||
|
||||
#### Event: 'crashed' _Deprecated_
|
||||
|
||||
Returns:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue