mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
docs: recommend setting e.returnValue (#33628)
This commit is contained in:
@@ -473,7 +473,7 @@ window.onbeforeunload = (e) => {
|
||||
// a non-void value will silently cancel the close.
|
||||
// It is recommended to use the dialog API to let the user confirm closing the
|
||||
// application.
|
||||
e.returnValue = false // equivalent to `return false` but not recommended
|
||||
e.returnValue = false
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user