Shell openExternal can take optional callback (macOS)
This commit is contained in:
parent
1b5b29901c
commit
b266533dfc
6 changed files with 85 additions and 10 deletions
|
@ -34,18 +34,22 @@ Returns `Boolean` - Whether the item was successfully opened.
|
|||
|
||||
Open the given file in the desktop's default manner.
|
||||
|
||||
### `shell.openExternal(url[, options])`
|
||||
### `shell.openExternal(url[, options, callback])`
|
||||
|
||||
* `url` String
|
||||
* `options` Object (optional) _macOS_
|
||||
* `activate` Boolean - `true` to bring the opened application to the
|
||||
foreground. The default is `true`.
|
||||
* `callback` Function (optional) _macOS_
|
||||
|
||||
Returns `Boolean` - Whether an application was available to open the URL.
|
||||
|
||||
Open the given external protocol URL in the desktop's default manner. (For
|
||||
example, mailto: URLs in the user's default mail agent).
|
||||
|
||||
If a `callback` is passed, the API call will be asynchronous and the result
|
||||
will be passed via `callback(opened)`.
|
||||
|
||||
### `shell.moveItemToTrash(fullPath)`
|
||||
|
||||
* `fullPath` String
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue