Browse Source

docs: recommend setting e.returnValue (#33646)

Co-authored-by: Cheng Zhao <[email protected]>
trop[bot] 3 years ago
parent
commit
d37b2671e4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/api/browser-window.md

+ 1 - 1
docs/api/browser-window.md

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