mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Document the optional params
This commit is contained in:
@@ -448,11 +448,13 @@ bar, and on macOS you can visit it from dock menu.
|
||||
|
||||
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
|
||||
app to handle `electron://` links, call this method with `electron` as the
|
||||
parameter.
|
||||
* `path` String (optional) _Windows_
|
||||
* `args` Array (options) _Windows_
|
||||
|
||||
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
|
||||
@@ -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
|
||||
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`.
|
||||
|
||||
**Note:** On macOS, you can only register protocols that have been added to
|
||||
|
||||
Reference in New Issue
Block a user