]> khamidou — GitHub mirrors - electron.git/commitdiff
Try to clarify docs for window.onbeforeunload()
authorThomas Tuts <thomas.tuts@gmail.com>
Tue, 9 Jun 2015 14:56:45 +0000 (16:56 +0200)
committerThomas Tuts <thomas.tuts@gmail.com>
Tue, 9 Jun 2015 14:56:45 +0000 (16:56 +0200)
docs/api/browser-window.md

index 6358e15e1c18171bd5af350b2dc3656b5cb21690..4211ac8020fd305140c9df8c3457d83af4789f0b 100644 (file)
@@ -131,9 +131,9 @@ window.onbeforeunload = function(e) {
   console.log('I do not want to be closed');
 
   // Unlike usual browsers, in which a string should be returned and the user is
-  // prompted to confirm the page unload. Electron gives the power completely
-  // to the developers, return empty string or false would prevent the unloading
-  // now. You can also use the dialog API to let user confirm it.
+  // prompted to confirm the page unload, Electron gives developers more options.
+  // Returning empty string or false would prevent the unloading now.
+  // You can also use the dialog API to let the user confirm closing the application.
   return false;
 };
 ```