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'
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_
* `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_
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()`
### `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()`
* `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_
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.
* `type` String - Can be `"none"`, `"info"`, `"error"`, `"question"` or
`"warning"`. On Windows, "question" displays the same icon as "info", unless
you set an icon using the "icon" option.
- * `buttons` Array - Array of texts for buttons. On Windows, an empty array will result in one button labeled "OK".
+ * `buttons` Array - Array of texts for buttons. On Windows, an empty array
+ will result in one button labeled "OK".
* `defaultId` Integer - Index of the button in the buttons array which will
be selected by default when the message box opens.
* `title` String - Title of the message box, some platforms will not show it.