]> khamidou — GitHub mirrors - electron.git/commitdiff
Restructure the docs to put more tutorials.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 30 Apr 2014 06:52:58 +0000 (14:52 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 30 Apr 2014 06:52:58 +0000 (14:52 +0800)
docs/README.md
docs/api/browser/browser-window.md
docs/tutorial/quick-start.md [moved from docs/quick-start.md with 100% similarity]
docs/tutorial/use-native-node-module.md [moved from docs/use-native-modules.md with 98% similarity]

index 671e1fd4bcfd833b7bee0af310ba540f5b16124e..8fa06851605290734a757752833c47a4ff59ae8a 100644 (file)
@@ -1,9 +1,9 @@
 # Atom-Shell Documentations
 
-## Guides
+## Tutorials
 
-* [Quick start](quick-start.md)
-* [Use native modules](use-native-modules.md)
+* [Quick start](tutorial/quick-start.md)
+* [Use native node modules](tutorial/use-native-node-modules.md)
 
 ## Development
 
index 19fcb2591aa586678d5a2a20dfbdb254d4c8b271..7768e0b86dc8d76873536b01aa47b333a2416e40 100644 (file)
@@ -113,14 +113,8 @@ window.onbeforeunload = function(e) {
 
 ### Event: 'closed'
 
-Emitted when the window is closed. At the time of this event, window is not
-destroyed yet so you can still do some operations to the window (but you
-shouldn't!).
-
-### Event: 'destroyed'
-
-Emitted when the memory taken by the native window is released. Usually you
-should dereference the javascript object when received this event.
+Emitted when the window is closed. After you have received this event you should
+remove the reference to the window and avoid using it anymore.
 
 ### Event: 'unresponsive'
 
@@ -159,12 +153,11 @@ Get the `WebContents` of devtools of this window.
 
 ### BrowserWindow.destroy()
 
-Destroy the window and free the memory without closing it.
+Force closing the window, the `unload` and `beforeunload` event won't be emitted
+for the web page, and `close` event would also not be emitted for this window,
+but it would gurrantee the `closed` event to be emitted.
 
-**Note:** Usually you should always call `Window.close()` to close the window,
-**which will emit `beforeunload` and `unload` events for DOM. Only use
-**`Window.destroy()` when the window gets into a very bad state and you want
-**to force closing it.
+You should only use this method when the web page has crashed.
 
 ### BrowserWindow.close()
 
similarity index 98%
rename from docs/use-native-modules.md
rename to docs/tutorial/use-native-node-module.md
index ae7481183d517331899bcc4a8a0e5f7cad1754e7..7caed97cf11d0253c5e084c54d9eedb01eab5f16 100644 (file)
@@ -1,4 +1,4 @@
-# Use native modules
+# Use native node modules
 
 Since atom-shell is using a different V8 version from the official node, you
 need to build native module against atom-shell's headers to use them.