Browse Source

docs: recommend setting e.returnValue (#33644)

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

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

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