mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
docs: fix incorrect heading levels (#55407)
Several API entries were one heading level too deep relative to their sibling events and methods, or skipped a level under their section. Claude-Session: https://claude.ai/code/session_01KX1hkKfxeSmmXK7rv1wNCE Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
3dfc698827
commit
2954493d46
6 files changed
+14
-14
No files matched your search
@@ -355,7 +355,7 @@ Activate inspector on host:port and break at start of user script. Default host:
|
||||
|
||||
Aliased to `--debug-brk=[host:]port`.
|
||||
|
||||
#### `--inspect-brk-node[=[host:]port]`
|
||||
### `--inspect-brk-node[=[host:]port]`
|
||||
|
||||
Activate inspector on `host:port` and break at start of the first internal
|
||||
JavaScript script executed when the inspector is available.
|
||||
|
||||
@@ -277,15 +277,15 @@ If the crash reporter is started in the main process, Node child processes are
|
||||
monitored automatically. There is no way to start the crash reporter from a
|
||||
Node child process.
|
||||
|
||||
#### `process.crashReporter.getParameters()`
|
||||
### `process.crashReporter.getParameters()`
|
||||
|
||||
See [`crashReporter.getParameters()`](#crashreportergetparameters).
|
||||
|
||||
#### `process.crashReporter.addExtraParameter(key, value)`
|
||||
### `process.crashReporter.addExtraParameter(key, value)`
|
||||
|
||||
See [`crashReporter.addExtraParameter(key, value)`](#crashreporteraddextraparameterkey-value).
|
||||
|
||||
#### `process.crashReporter.removeExtraParameter(key)`
|
||||
### `process.crashReporter.removeExtraParameter(key)`
|
||||
|
||||
See [`crashReporter.removeExtraParameter(key)`](#crashreporterremoveextraparameterkey).
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ This module is intended to be used by a script registered to a session via
|
||||
|
||||
The `localAIHandler` module has the following methods:
|
||||
|
||||
#### `localAIHandler.setPromptAPIHandler(promptAPIHandler)` _Experimental_
|
||||
### `localAIHandler.setPromptAPIHandler(promptAPIHandler)` _Experimental_
|
||||
|
||||
* `promptAPIHandler` Function\<typeof [LanguageModelUtility](language-model-utility.md) | null\>
|
||||
* `details` Object
|
||||
|
||||
@@ -22,7 +22,7 @@ pushNotifications.on('received-apns-notification', (event, userInfo) => {
|
||||
|
||||
The `pushNotification` module emits the following events:
|
||||
|
||||
#### Event: 'received-apns-notification' _macOS_
|
||||
### Event: 'received-apns-notification' _macOS_
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ Executes editing command `cut` in page.
|
||||
|
||||
Executes editing command `copy` in page.
|
||||
|
||||
#### `<webview>.centerSelection()`
|
||||
### `<webview>.centerSelection()`
|
||||
|
||||
Centers the current text selection in page.
|
||||
|
||||
@@ -503,15 +503,15 @@ Executes editing command `selectAll` in page.
|
||||
|
||||
Executes editing command `unselect` in page.
|
||||
|
||||
#### `<webview>.scrollToTop()`
|
||||
### `<webview>.scrollToTop()`
|
||||
|
||||
Scrolls to the top of the current `<webview>`.
|
||||
|
||||
#### `<webview>.scrollToBottom()`
|
||||
### `<webview>.scrollToBottom()`
|
||||
|
||||
Scrolls to the bottom of the current `<webview>`.
|
||||
|
||||
#### `<webview>.adjustSelection(options)`
|
||||
### `<webview>.adjustSelection(options)`
|
||||
|
||||
* `options` Object
|
||||
* `start` Number (optional) - Amount to shift the start index of the current selection.
|
||||
@@ -1048,7 +1048,7 @@ Returns:
|
||||
|
||||
Emitted when a link is clicked in DevTools or 'Open in new tab' is selected for a link in its context menu.
|
||||
|
||||
#### Event: 'devtools-search-query'
|
||||
### Event: 'devtools-search-query'
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ The `virtualDisplay` addon leverages macOS CoreGraphics APIs to create virtual d
|
||||
|
||||
## Methods
|
||||
|
||||
#### `virtualDisplay.create([options])`
|
||||
### `virtualDisplay.create([options])`
|
||||
|
||||
Creates a virtual display and returns a display ID.
|
||||
|
||||
@@ -30,7 +30,7 @@ const displayId = virtualDisplay.create({
|
||||
> [!NOTE]
|
||||
> It is recommended to call [`virtualDisplay.forceCleanup()`](#virtualdisplayforcecleanup) before every test to prevent display creation from failing in that test. macOS CoreGraphics maintains an internal display ID allocation pool that can become corrupted when virtual displays are created and destroyed rapidly during testing. Without proper cleanup, subsequent display creation may fail with inconsistent display IDs, resulting in test flakiness.
|
||||
|
||||
#### `virtualDisplay.forceCleanup()`
|
||||
### `virtualDisplay.forceCleanup()`
|
||||
|
||||
Performs a complete cleanup of all virtual displays and resets the macOS CoreGraphics display system.
|
||||
|
||||
@@ -40,7 +40,7 @@ beforeEach(() => {
|
||||
})
|
||||
```
|
||||
|
||||
#### `virtualDisplay.destroy(displayId)`
|
||||
### `virtualDisplay.destroy(displayId)`
|
||||
|
||||
Removes the virtual display.
|
||||
|
||||
|
||||
Reference in new issue
Block a user