fix lint error
This commit is contained in:
parent
bb153ee79e
commit
deb7ccbef3
1 changed files with 1 additions and 1 deletions
|
@ -410,7 +410,7 @@ window.onbeforeunload = (e) => {
|
||||||
// a non-void value will silently cancel the close.
|
// a non-void value will silently cancel the close.
|
||||||
// It is recommended to use the dialog API to let the user confirm closing the
|
// It is recommended to use the dialog API to let the user confirm closing the
|
||||||
// application.
|
// application.
|
||||||
e.returnValue = false // equivalent to `return false` but not recommended
|
e.returnValue = false // equivalent to `return false` but not recommended
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
_**Note**: There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', handler)`. It is recommended to always set the `event.returnValue` explicitly, instead of just returning a value, as the former works more consistently within Electron._
|
_**Note**: There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', handler)`. It is recommended to always set the `event.returnValue` explicitly, instead of just returning a value, as the former works more consistently within Electron._
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue