docs: recommend setting e.returnValue (#33645)

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2022-04-18 13:24:04 +09:00
committed by GitHub
parent f30034d1a9
commit 75ccd1fb65

View File

@@ -464,7 +464,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
}
```