|
@@ -34,10 +34,12 @@ Emitted when Electron has finished initialization.
|
|
|
|
|
|
Emitted when all windows have been closed.
|
|
|
|
|
|
-If you do not subscribe to this event and all windows are closed, the default behavior is to quit the app; however, if you subscribe, you control whether the app quits or not. If the
|
|
|
-user pressed `Cmd + Q`, or the developer called `app.quit()`, Electron will
|
|
|
-first try to close all the windows and then emit the `will-quit` event, and in
|
|
|
-this case the `window-all-closed` event would not be emitted.
|
|
|
+If you do not subscribe to this event and all windows are closed, the default
|
|
|
+behavior is to quit the app; however, if you subscribe, you control whether the
|
|
|
+app quits or not. If the user pressed `Cmd + Q`, or the developer called
|
|
|
+`app.quit()`, Electron will first try to close all the windows and then emit the
|
|
|
+`will-quit` event, and in this case the `window-all-closed` event would not be
|
|
|
+emitted.
|
|
|
|
|
|
### Event: 'before-quit'
|
|
|
|
|
@@ -87,7 +89,8 @@ handle this case (even before the `ready` event is emitted).
|
|
|
|
|
|
You should call `event.preventDefault()` if you want to handle this event.
|
|
|
|
|
|
-On Windows, you have to parse `process.argv` (in the main process) to get the filepath.
|
|
|
+On Windows, you have to parse `process.argv` (in the main process) to get the
|
|
|
+filepath.
|
|
|
|
|
|
### Event: 'open-url' _OS X_
|
|
|
|
|
@@ -108,8 +111,8 @@ Returns:
|
|
|
* `event` Event
|
|
|
* `hasVisibleWindows` Boolean
|
|
|
|
|
|
-Emitted when the application is activated, which usually happens when the user clicks on
|
|
|
-the application's dock icon.
|
|
|
+Emitted when the application is activated, which usually happens when the user
|
|
|
+clicks on the application's dock icon.
|
|
|
|
|
|
### Event: 'continue-activity' _OS X_
|
|
|
|
|
@@ -251,7 +254,8 @@ Emitted when the gpu process crashes.
|
|
|
|
|
|
The `app` object has the following methods:
|
|
|
|
|
|
-**Note:** Some methods are only available on specific operating systems and are labeled as such.
|
|
|
+**Note:** Some methods are only available on specific operating systems and are
|
|
|
+labeled as such.
|
|
|
|
|
|
### `app.quit()`
|
|
|
|
|
@@ -283,7 +287,8 @@ Hides all application windows without minimizing them.
|
|
|
|
|
|
### `app.show()` _OS X_
|
|
|
|
|
|
-Shows application windows after they were hidden. Does not automatically focus them.
|
|
|
+Shows application windows after they were hidden. Does not automatically focus
|
|
|
+them.
|
|
|
|
|
|
### `app.getAppPath()`
|
|
|
|
|
@@ -397,8 +402,8 @@ The API uses the Windows Registry and LSSetDefaultHandlerForURLScheme internally
|
|
|
|
|
|
* `protocol` String - The name of your protocol, without `://`.
|
|
|
|
|
|
-This method checks if the current executable as the default handler for a protocol
|
|
|
-(aka URI scheme). If so, it will remove the app as the default handler.
|
|
|
+This method checks if the current executable as the default handler for a
|
|
|
+protocol (aka URI scheme). If so, it will remove the app as the default handler.
|
|
|
|
|
|
### `app.isDefaultProtocolClient(protocol)` _OS X_ _Windows_
|
|
|
|
|
@@ -407,8 +412,11 @@ This method checks if the current executable as the default handler for a protoc
|
|
|
This method checks if the current executable is the default handler for a protocol
|
|
|
(aka URI scheme). If so, it will return true. Otherwise, it will return false.
|
|
|
|
|
|
-**Note:** On OS X, you can use this method to check if the app has been registered as the default protocol handler for a protocol. You can also verify this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the OS X machine.
|
|
|
-Please refer to [Apple's documentation][LSCopyDefaultHandlerForURLScheme] for details.
|
|
|
+**Note:** On OS X, you can use this method to check if the app has been
|
|
|
+registered as the default protocol handler for a protocol. You can also verify
|
|
|
+this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the
|
|
|
+OS X machine. Please refer to
|
|
|
+[Apple's documentation][LSCopyDefaultHandlerForURLScheme] for details.
|
|
|
|
|
|
The API uses the Windows Registry and LSCopyDefaultHandlerForURLScheme internally.
|
|
|
|