docs: recommend setting e.returnValue (#33646)

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
trop[bot]
2022-04-12 12:09:41 +02:00
committed by GitHub
parent 60b91ddcfb
commit d37b2671e4

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