docs: recommend setting e.returnValue (#33628)

This commit is contained in:
Cheng Zhao 2022-04-07 16:39:51 +09:00 committed by GitHub
parent 68d6d8d451
commit 75ccec7996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}
```