mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
docs: add a few API history fragments (#49340)
* docs: add a few API history fragments * manual fixes
This commit is contained in:
@@ -29,6 +29,14 @@ Show the given file in a file manager. If possible, select the file.
|
||||
|
||||
### `shell.openPath(path)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/20682
|
||||
breaking-changes-header: api-changed-shellopenitem-is-now-shellopenpath
|
||||
```
|
||||
-->
|
||||
|
||||
* `path` string
|
||||
|
||||
Returns `Promise<string>` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "".
|
||||
@@ -37,6 +45,18 @@ Open the given file in the desktop's default manner.
|
||||
|
||||
### `shell.openExternal(url[, options])`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/4508
|
||||
description: "Added `activate` option."
|
||||
- pr-url: https://github.com/electron/electron/pull/15065
|
||||
description: "Added `workingDirectory` option."
|
||||
- pr-url: https://github.com/electron/electron/pull/37139
|
||||
description: "Added `logUsage` option."
|
||||
```
|
||||
-->
|
||||
|
||||
* `url` string - Max 2081 characters on Windows.
|
||||
* `options` Object (optional)
|
||||
* `activate` boolean (optional) _macOS_ - `true` to bring the opened application to the foreground. The default is `true`.
|
||||
@@ -50,6 +70,14 @@ Open the given external protocol URL in the desktop's default manner. (For examp
|
||||
|
||||
### `shell.trashItem(path)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/25114
|
||||
breaking-changes-header: deprecated-shellmoveitemtotrash
|
||||
```
|
||||
-->
|
||||
|
||||
* `path` string - path to the item to be moved to the trash.
|
||||
|
||||
Returns `Promise<void>` - Resolves when the operation has been completed.
|
||||
|
||||
Reference in New Issue
Block a user