Document the optional params

This commit is contained in:
Samuel Attard 2016-08-16 15:38:32 +10:00
parent e5daf63b0e
commit db27da5db0
No known key found for this signature in database
GPG key ID: 273DC1869D8F13EF

View file

@ -448,11 +448,13 @@ bar, and on macOS you can visit it from dock menu.
Clears the recent documents list. Clears the recent documents list.
### `app.setAsDefaultProtocolClient(protocol)` _macOS_ _Windows_ ### `app.setAsDefaultProtocolClient(protocol[, path, args])` _macOS_ _Windows_
* `protocol` String - The name of your protocol, without `://`. If you want your * `protocol` String - The name of your protocol, without `://`. If you want your
app to handle `electron://` links, call this method with `electron` as the app to handle `electron://` links, call this method with `electron` as the
parameter. parameter.
* `path` String (optional) _Windows_
* `args` Array (options) _Windows_
This method sets the current executable as the default handler for a protocol This method sets the current executable as the default handler for a protocol
(aka URI scheme). It allows you to integrate your app deeper into the operating (aka URI scheme). It allows you to integrate your app deeper into the operating
@ -460,6 +462,9 @@ system. Once registered, all links with `your-protocol://` will be opened with
the current executable. The whole link, including protocol, will be passed to the current executable. The whole link, including protocol, will be passed to
your application as a parameter. your application as a parameter.
On windows you can provide optional parameters path, the path to your executable,
and args, an array of arguments to be passed to your executable when it launches.
Returns `true` when the call succeeded, otherwise returns `false`. Returns `true` when the call succeeded, otherwise returns `false`.
**Note:** On macOS, you can only register protocols that have been added to **Note:** On macOS, you can only register protocols that have been added to