build: move to the new docs parser (#18103)
* build: move to the new docs parser * chore: remove the bad getTitle param doc * build: update parser/ts gen deps + fix some docs issues highlighted by GH desktop * chore: apply suggestions from code review Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com> * chore: update docs for accidentally removed things * chore: update docs/api/command-line.md Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>
This commit is contained in:
parent
9ec59cbc6c
commit
a96b6e2c96
28 changed files with 461 additions and 1234 deletions
136
docs/api/app.md
136
docs/api/app.md
|
@ -782,8 +782,8 @@ Returns `Object`:
|
|||
* `minItems` Integer - The minimum number of items that will be shown in the
|
||||
Jump List (for a more detailed description of this value see the
|
||||
[MSDN docs][JumpListBeginListMSDN]).
|
||||
* `removedItems` [JumpListItem[]](structures/jump-list-item.md) - Array of `JumpListItem` objects that correspond to
|
||||
items that the user has explicitly removed from custom categories in the
|
||||
* `removedItems` [JumpListItem[]](structures/jump-list-item.md) - Array of `JumpListItem`
|
||||
objects that correspond to items that the user has explicitly removed from custom categories in the
|
||||
Jump List. These items must not be re-added to the Jump List in the **next**
|
||||
call to `app.setJumpList()`, Windows will not display any custom category
|
||||
that contains any of the removed items.
|
||||
|
@ -1016,7 +1016,7 @@ Returns [`GPUFeatureStatus`](structures/gpu-feature-status.md) - The Graphics Fe
|
|||
|
||||
* `infoType` String - Values can be either `basic` for basic info or `complete` for complete info.
|
||||
|
||||
Returns `Promise`
|
||||
Returns `Promise<unknown>`
|
||||
|
||||
For `infoType` equal to `complete`:
|
||||
Promise is fulfilled with `Object` containing all the GPU Information as in [chromium's GPUInfo object](https://chromium.googlesource.com/chromium/src.git/+/69.0.3497.106/gpu/config/gpu_info.cc). This includes the version and driver information that's shown on `chrome://gpu` page.
|
||||
|
@ -1159,7 +1159,7 @@ This API must be called after the `ready` event is emitted.
|
|||
|
||||
**[Deprecated Soon](modernization/property-updates.md)**
|
||||
|
||||
### `app.showAboutPanel` _macOS_ _Linux_
|
||||
### `app.showAboutPanel()` _macOS_ _Linux_
|
||||
|
||||
Show the app's about panel options. These options can be overridden with `app.setAboutPanelOptions(options)`.
|
||||
|
||||
|
@ -1177,11 +1177,11 @@ Show the app's about panel options. These options can be overridden with `app.se
|
|||
Set the about panel options. This will override the values defined in the app's
|
||||
`.plist` file on MacOS. See the [Apple docs][about-panel-options] for more details. On Linux, values must be set in order to be shown; there are no defaults.
|
||||
|
||||
### `app.isEmojiPanelSupported`
|
||||
### `app.isEmojiPanelSupported()`
|
||||
|
||||
Returns `Boolean` - whether or not the current OS version allows for native emoji pickers.
|
||||
|
||||
### `app.showEmojiPanel` _macOS_ _Windows_
|
||||
### `app.showEmojiPanel()` _macOS_ _Windows_
|
||||
|
||||
Show the platform's native emoji picker.
|
||||
|
||||
|
@ -1202,42 +1202,6 @@ stopAccessingSecurityScopedResource()
|
|||
|
||||
Start accessing a security scoped resource. With this method Electron applications that are packaged for the Mac App Store may reach outside their sandbox to access files chosen by the user. See [Apple's documentation](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) for a description of how this system works.
|
||||
|
||||
### `app.commandLine.appendSwitch(switch[, value])`
|
||||
|
||||
* `switch` String - A command-line switch, without the leading `--`
|
||||
* `value` String (optional) - A value for the given switch
|
||||
|
||||
Append a switch (with optional `value`) to Chromium's command line.
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
### `app.commandLine.appendArgument(value)`
|
||||
|
||||
* `value` String - The argument to append to the command line
|
||||
|
||||
Append an argument to Chromium's command line. The argument will be quoted
|
||||
correctly. Switches will precede arguments regardless of appending order.
|
||||
|
||||
If you're appending an argument like `--switch=value`, consider using `appendSwitch('switch', 'value')` instead.
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
|
||||
### `app.commandLine.hasSwitch(switch)`
|
||||
|
||||
* `switch` String - A command-line switch
|
||||
|
||||
Returns `Boolean` - Whether the command-line switch is present.
|
||||
|
||||
### `app.commandLine.getSwitchValue(switch)`
|
||||
|
||||
* `switch` String - A command-line switch
|
||||
|
||||
Returns `String` - The command-line switch value.
|
||||
|
||||
**Note:** When the switch is not present or has no value, it returns empty string.
|
||||
|
||||
### `app.enableSandbox()` _Experimental_
|
||||
|
||||
Enables full sandbox mode on the app.
|
||||
|
@ -1264,70 +1228,6 @@ method returns false. If we fail to perform the copy, then this method will
|
|||
throw an error. The message in the error should be informative and tell
|
||||
you exactly what went wrong
|
||||
|
||||
### `app.dock.bounce([type])` _macOS_
|
||||
|
||||
* `type` String (optional) - Can be `critical` or `informational`. The default is
|
||||
`informational`
|
||||
|
||||
When `critical` is passed, the dock icon will bounce until either the
|
||||
application becomes active or the request is canceled.
|
||||
|
||||
When `informational` is passed, the dock icon will bounce for one second.
|
||||
However, the request remains active until either the application becomes active
|
||||
or the request is canceled.
|
||||
|
||||
Returns `Integer` an ID representing the request.
|
||||
|
||||
### `app.dock.cancelBounce(id)` _macOS_
|
||||
|
||||
* `id` Integer
|
||||
|
||||
Cancel the bounce of `id`.
|
||||
|
||||
### `app.dock.downloadFinished(filePath)` _macOS_
|
||||
|
||||
* `filePath` String
|
||||
|
||||
Bounces the Downloads stack if the filePath is inside the Downloads folder.
|
||||
|
||||
### `app.dock.setBadge(text)` _macOS_
|
||||
|
||||
* `text` String
|
||||
|
||||
Sets the string to be displayed in the dock’s badging area.
|
||||
|
||||
### `app.dock.getBadge()` _macOS_
|
||||
|
||||
Returns `String` - The badge string of the dock.
|
||||
|
||||
### `app.dock.hide()` _macOS_
|
||||
|
||||
Hides the dock icon.
|
||||
|
||||
### `app.dock.show()` _macOS_
|
||||
|
||||
Returns `Promise<void>` - Resolves when the dock icon is shown.
|
||||
|
||||
### `app.dock.isVisible()` _macOS_
|
||||
|
||||
Returns `Boolean` - Whether the dock icon is visible.
|
||||
|
||||
### `app.dock.setMenu(menu)` _macOS_
|
||||
|
||||
* `menu` [Menu](menu.md)
|
||||
|
||||
Sets the application's [dock menu][dock-menu].
|
||||
|
||||
### `app.dock.getMenu()` _macOS_
|
||||
|
||||
Returns `Menu | null` - The application's [dock menu][dock-menu].
|
||||
|
||||
### `app.dock.setIcon(image)` _macOS_
|
||||
|
||||
* `image` ([NativeImage](native-image.md) | String)
|
||||
|
||||
Sets the `image` associated with this dock icon.
|
||||
|
||||
## Properties
|
||||
|
||||
### `app.accessibilitySupportEnabled` _macOS_ _Windows_
|
||||
|
@ -1342,7 +1242,7 @@ This API must be called after the `ready` event is emitted.
|
|||
|
||||
### `app.applicationMenu`
|
||||
|
||||
A `Menu` property that return [`Menu`](menu.md) if one has been set and `null` otherwise.
|
||||
A `Menu | null` property that returns [`Menu`](menu.md) if one has been set and `null` otherwise.
|
||||
Users can pass a [Menu](menu.md) to set this property.
|
||||
|
||||
### `app.badgeCount` _Linux_ _macOS_
|
||||
|
@ -1354,14 +1254,15 @@ On macOS, setting this with any nonzero integer shows on the dock icon. On Linux
|
|||
**Note:** Unity launcher requires the existence of a `.desktop` file to work,
|
||||
for more information please read [Desktop Environment Integration][unity-requirement].
|
||||
|
||||
### `app.userAgentFallback`
|
||||
### `app.commandLine`
|
||||
|
||||
A `String` which is the user agent string Electron will use as a global fallback.
|
||||
A [`CommandLine`](./command-line.md) object that allows you to read and manipulate the
|
||||
command line arguments that Chromium uses.
|
||||
|
||||
This is the user agent that will be used when no user agent is set at the
|
||||
`webContents` or `session` level. Useful for ensuring your entire
|
||||
app has the same user agent. Set to a custom value as early as possible
|
||||
in your apps initialization to ensure that your overridden value is used.
|
||||
### `app.dock` _macOS_
|
||||
|
||||
A [`Dock`](./dock.md) object that allows you to perform actions on your app icon in the user's
|
||||
dock on macOS.
|
||||
|
||||
### `app.isPackaged`
|
||||
|
||||
|
@ -1388,3 +1289,12 @@ Usually the `name` field of `package.json` is a short lowercased name, according
|
|||
to the npm modules spec. You should usually also specify a `productName`
|
||||
field, which is your application's full capitalized name, and which will be
|
||||
preferred over `name` by Electron.
|
||||
|
||||
### `app.userAgentFallback`
|
||||
|
||||
A `String` which is the user agent string Electron will use as a global fallback.
|
||||
|
||||
This is the user agent that will be used when no user agent is set at the
|
||||
`webContents` or `session` level. It is useful for ensuring that your entire
|
||||
app has the same user agent. Set to a custom value as early as possible
|
||||
in your app's initialization to ensure that your overridden value is used.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue