Skip to content

Commit

Permalink
chore: update ref to docs (🤖)
Browse files Browse the repository at this point in the history
  • Loading branch information
electron-bot committed Dec 5, 2023
1 parent 30b069c commit 08ca9ad
Show file tree
Hide file tree
Showing 148 changed files with 770 additions and 499 deletions.
15 changes: 1 addition & 14 deletions docs/latest/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ A `boolean` property that returns `true` if the app is packaged, `false` otherw
[tasks]:https://learn.microsoft.com/en-us/windows/win32/shell/taskbar-extensions#tasks
[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids
[electron-forge]: https://www.electronforge.io/
[electron-packager]: https://github.com/electron/electron-packager
[electron-packager]: https://github.com/electron/packager
[CFBundleURLTypes]: https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-102207-TPXREF115
[LSCopyDefaultHandlerForURLScheme]: https://developer.apple.com/documentation/coreservices/1441725-lscopydefaulthandlerforurlscheme?language=objc
[handoff]: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/Handoff/HandoffFundamentals/HandoffFundamentals.html
Expand Down Expand Up @@ -1578,19 +1578,6 @@ This is the user agent that will be used when no user agent is set at the
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.

### `app.runningUnderRosettaTranslation` _macOS_ _Readonly_ _Deprecated_

A `boolean` which when `true` indicates that the app is currently running
under the [Rosetta Translator Environment](https://en.wikipedia.org/wiki/Rosetta_(software)).

You can use this property to prompt users to download the arm64 version of
your application when they are running the x64 version under Rosetta
incorrectly.

**Deprecated:** This property is superceded by the `runningUnderARM64Translation`
property which detects when the app is being translated to ARM64 in both macOS
and Windows.

### `app.runningUnderARM64Translation` _Readonly_ _macOS_ _Windows_

A `boolean` which when `true` indicates that the app is currently running under
Expand Down
6 changes: 5 additions & 1 deletion docs/latest/api/browser-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ app.whenReady().then(() => {
* `defaultEncoding` string (optional) - Defaults to `ISO-8859-1`.
* `backgroundThrottling` boolean (optional) - Whether to throttle animations and timers
when the page becomes background. This also affects the
[Page Visibility API](latest/api/browser-window.md#page-visibility). Defaults to `true`.
[Page Visibility API](latest/api/browser-window.md#page-visibility). When at least one
[webContents](latest/api/web-contents.md) displayed in a single
[browserWindow](latest/api/browser-window.md) has disabled `backgroundThrottling` then
frames will be drawn and swapped for the whole window and other
[webContents](latest/api/web-contents.md) displayed by it. Defaults to `true`.
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
window. Defaults to `false`. See the
[offscreen rendering tutorial](latest/tutorial/offscreen-rendering.md) for
Expand Down
60 changes: 6 additions & 54 deletions docs/latest/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
should have rounded corners on macOS. Default is `true`. Setting this property
to `false` will prevent the window from being fullscreenable.
* `fullscreenWindowTitle` boolean (optional) _macOS_ _Deprecated_ - Shows
the title in the title bar in full screen mode on macOS for `hiddenInset`
titleBarStyle. Default is `false`.
* `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`.
Expand Down Expand Up @@ -356,7 +353,11 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `defaultEncoding` string (optional) - Defaults to `ISO-8859-1`.
* `backgroundThrottling` boolean (optional) - Whether to throttle animations and timers
when the page becomes background. This also affects the
[Page Visibility API](latest/api/browser-window.md#page-visibility). Defaults to `true`.
[Page Visibility API](latest/api/browser-window.md#page-visibility). When at least one
[webContents](latest/api/web-contents.md) displayed in a single
[browserWindow](latest/api/browser-window.md) has disabled `backgroundThrottling` then
frames will be drawn and swapped for the whole window and other
[webContents](latest/api/web-contents.md) displayed by it. Defaults to `true`.
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
window. Defaults to `false`. See the
[offscreen rendering tutorial](latest/tutorial/offscreen-rendering.md) for
Expand Down Expand Up @@ -672,36 +673,6 @@ The following app commands are explicitly supported on Linux:
* `browser-backward`
* `browser-forward`

#### Event: 'scroll-touch-begin' _macOS_ _Deprecated_

Emitted when scroll wheel event phase has begun.

> **Note**
> This event is deprecated beginning in Electron 22.0.0. See [Breaking
> Changes](latest/breaking-changes.md#deprecated-browserwindow-scroll-touch--events)
> for details of how to migrate to using the [WebContents
> `input-event`](latest/api/web-contents.md#event-input-event) event.
#### Event: 'scroll-touch-end' _macOS_ _Deprecated_

Emitted when scroll wheel event phase has ended.

> **Note**
> This event is deprecated beginning in Electron 22.0.0. See [Breaking
> Changes](latest/breaking-changes.md#deprecated-browserwindow-scroll-touch--events)
> for details of how to migrate to using the [WebContents
> `input-event`](latest/api/web-contents.md#event-input-event) event.
#### Event: 'scroll-touch-edge' _macOS_ _Deprecated_

Emitted when scroll wheel event phase filed upon reaching the edge of element.

> **Note**
> This event is deprecated beginning in Electron 22.0.0. See [Breaking
> Changes](latest/breaking-changes.md#deprecated-browserwindow-scroll-touch--events)
> for details of how to migrate to using the [WebContents
> `input-event`](latest/api/web-contents.md#event-input-event) event.
#### Event: 'swipe' _macOS_

Returns:
Expand Down Expand Up @@ -1904,25 +1875,6 @@ Passing `null` will reset the position to default.
Returns `Point | null` - The custom position for the traffic light buttons in
frameless window, `null` will be returned when there is no custom position.

#### `win.setTrafficLightPosition(position)` _macOS_ _Deprecated_

* `position` [Point](latest/api/structures/point.md)

Set a custom position for the traffic light buttons in frameless window.
Passing `{ x: 0, y: 0 }` will reset the position to default.

> **Note**
> This function is deprecated. Use [setWindowButtonPosition](#winsetwindowbuttonpositionposition-macos) instead.
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_

Returns `Point` - The custom position for the traffic light buttons in
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
position.

> **Note**
> This function is deprecated. Use [getWindowButtonPosition](#wingetwindowbuttonposition-macos) instead.
#### `win.setTouchBar(touchBar)` _macOS_

* `touchBar` TouchBar | null
Expand Down Expand Up @@ -1975,7 +1927,7 @@ removed in future Electron releases.
* `options` Object
* `color` String (optional) _Windows_ - The CSS color of the Window Controls Overlay when enabled.
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled.
* `height` Integer (optional) _Windows_ - The height of the title bar and Window Controls Overlay in pixels.
* `height` Integer (optional) _macOS_ _Windows_ - The height of the title bar and Window Controls Overlay in pixels.

On a Window with Window Controls Overlay already enabled, this method updates
the style of the title bar overlay.
Expand Down
10 changes: 10 additions & 0 deletions docs/latest/api/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ Options:
* `kioclient5`
* `kioclient`

### `ELECTRON_OZONE_PLATFORM_HINT` _Linux_

Selects the preferred platform backend used on Linux. The default one is `x11`. `auto` selects Wayland if possible, X11 otherwise.

Options:

* `auto`
* `wayland`
* `x11`

## Development Variables

The following environment variables are intended primarily for development and
Expand Down
27 changes: 19 additions & 8 deletions docs/latest/api/ipc-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ The `ipcRenderer` module has the following method to listen for events and send
Listens to `channel`, when a new message arrives `listener` would be called with
`listener(event, args...)`.

### `ipcRenderer.off(channel, listener)`

* `channel` string
* `listener` Function
* `event` [IpcRendererEvent][ipc-renderer-event]
* `...args` any[]

Alias for [`ipcRenderer.removeListener`](#ipcrendererremovelistenerchannel-listener).

### `ipcRenderer.once(channel, listener)`

* `channel` string
Expand All @@ -42,10 +51,20 @@ Listens to `channel`, when a new message arrives `listener` would be called with
Adds a one time `listener` function for the event. This `listener` is invoked
only the next time a message is sent to `channel`, after which it is removed.

### `ipcRenderer.addListener(channel, listener)`

* `channel` string
* `listener` Function
* `event` [IpcRendererEvent][ipc-renderer-event]
* `...args` any[]

Alias for [`ipcRenderer.on`](#ipcrendereronchannel-listener).

### `ipcRenderer.removeListener(channel, listener)`

* `channel` string
* `listener` Function
* `event` [IpcRendererEvent][ipc-renderer-event]
* `...args` any[]

Removes the specified `listener` from the listener array for the specified
Expand Down Expand Up @@ -192,14 +211,6 @@ ipcMain.on('port', (e, msg) => {
For more information on using `MessagePort` and `MessageChannel`, see the [MDN
documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel).

### `ipcRenderer.sendTo(webContentsId, channel, ...args)` _Deprecated_

* `webContentsId` number
* `channel` string
* `...args` any[]

Sends a message to a window with `webContentsId` via `channel`.

### `ipcRenderer.sendToHost(channel, ...args)`

* `channel` string
Expand Down
5 changes: 1 addition & 4 deletions docs/latest/api/screen.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ An example of creating a window that fills the whole screen:
// For more info, see:
// https://www.electronjs.org/docs/latest/api/screen
const { app, BrowserWindow } = require('electron')
const { app, BrowserWindow, screen } = require('electron/main')
let mainWindow = null
app.whenReady().then(() => {
// We cannot require the screen module until the app is ready.
const { screen } = require('electron')
// Create a window that fills the screen's available work area.
const primaryDisplay = screen.getPrimaryDisplay()
const { width, height } = primaryDisplay.workAreaSize
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ To clear the handler, call `setDevicePermissionHandler(null)`.
This handler can be used to provide default permissioning to devices without first calling for permission
to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device
permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used.
Additionally, the default behavior of Electron is to store granted device permision in memory.
Additionally, the default behavior of Electron is to store granted device permission in memory.
If longer term storage is needed, a developer can store granted device
permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`.
Expand Down
9 changes: 5 additions & 4 deletions docs/latest/api/structures/browser-window-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ hide_title: false
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
should have rounded corners on macOS. Default is `true`. Setting this property
to `false` will prevent the window from being fullscreenable.
* `fullscreenWindowTitle` boolean (optional) _macOS_ _Deprecated_ - Shows
the title in the title bar in full screen mode on macOS for `hiddenInset`
titleBarStyle. Default is `false`.
* `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`.
Expand Down Expand Up @@ -203,7 +200,11 @@ hide_title: false
* `defaultEncoding` string (optional) - Defaults to `ISO-8859-1`.
* `backgroundThrottling` boolean (optional) - Whether to throttle animations and timers
when the page becomes background. This also affects the
[Page Visibility API](latest/api/browser-window.md#page-visibility). Defaults to `true`.
[Page Visibility API](latest/api/browser-window.md#page-visibility). When at least one
[webContents](latest/api/web-contents.md) displayed in a single
[browserWindow](latest/api/browser-window.md) has disabled `backgroundThrottling` then
frames will be drawn and swapped for the whole window and other
[webContents](latest/api/web-contents.md) displayed by it. Defaults to `true`.
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
window. Defaults to `false`. See the
[offscreen rendering tutorial](latest/tutorial/offscreen-rendering.md) for
Expand Down
21 changes: 12 additions & 9 deletions docs/latest/api/structures/display.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,26 @@ hide_title: false

# Display Object

* `id` number - Unique identifier associated with the display.
* `accelerometerSupport` string - Can be `available`, `unavailable`, `unknown`.
* `bounds` [Rectangle](latest/api/structures/rectangle.md) - the bounds of the display in DIP points.
* `colorDepth` number - The number of bits per pixel.
* `colorSpace` string - represent a color space (three-dimensional object which contains all realizable color combinations) for the purpose of color conversions.
* `depthPerComponent` number - The number of bits per color component.
* `detected` boolean - `true`` if the display is detected by the system.
* `displayFrequency` number - The display refresh rate.
* `id` number - Unique identifier associated with the display. A value of of -1 means the display is invalid or the correct `id` is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop.
* `internal` boolean - `true` for an internal display and `false` for an external display.
* `label` string - User-friendly label, determined by the platform.
* `maximumCursorSize` [Size](latest/api/structures/size.md) - Maximum cursor size in native pixels.
* `nativeOrigin` [Point](latest/api/structures/point.md) - Returns the display's origin in pixel coordinates. Only available on windowing systems like X11 that position displays in pixel coordinates.
* `rotation` number - Can be 0, 90, 180, 270, represents screen rotation in
clock-wise degrees.
* `scaleFactor` number - Output device's pixel scale factor.
* `touchSupport` string - Can be `available`, `unavailable`, `unknown`.
* `monochrome` boolean - Whether or not the display is a monochrome display.
* `accelerometerSupport` string - Can be `available`, `unavailable`, `unknown`.
* `colorSpace` string - represent a color space (three-dimensional object which contains all realizable color combinations) for the purpose of color conversions
* `colorDepth` number - The number of bits per pixel.
* `depthPerComponent` number - The number of bits per color component.
* `displayFrequency` number - The display refresh rate.
* `bounds` [Rectangle](latest/api/structures/rectangle.md) - the bounds of the display in DIP points.
* `size` [Size](latest/api/structures/size.md)
* `workArea` [Rectangle](latest/api/structures/rectangle.md) - the work area of the display in DIP points.
* `workAreaSize` [Size](latest/api/structures/size.md)
* `internal` boolean - `true` for an internal display and `false` for an external display
* `workAreaSize` [Size](latest/api/structures/size.md) - The size of the work area.

The `Display` object represents a physical display connected to the system. A
fake `Display` may exist on a headless system, or a `Display` may correspond to
Expand Down
3 changes: 0 additions & 3 deletions docs/latest/api/structures/ipc-renderer-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ hide_title: false
# IpcRendererEvent Object extends `Event`

* `sender` [IpcRenderer](latest/api/ipc-renderer.md) - The `IpcRenderer` instance that emitted the event originally
* `senderId` Integer _Deprecated_ - The `webContents.id` that sent the message, you can call `event.sender.sendTo(event.senderId, ...)` to reply to the message, see [ipcRenderer.sendTo][ipc-renderer-sendto] for more information. This only applies to messages sent from a different renderer. Messages sent directly from the main process set `event.senderId` to `0`.
* `senderIsMainFrame` boolean (optional) _Deprecated_ - Whether the message sent via [ipcRenderer.sendTo][ipc-renderer-sendto] was sent by the main frame. This is relevant when `nodeIntegrationInSubFrames` is enabled in the originating `webContents`.
* `ports` [MessagePort][][] - A list of MessagePorts that were transferred with this message

[ipc-renderer-sendto]: latest/api/ipc-renderer.md#ipcrenderersendtowebcontentsid-channel-args-deprecated
[MessagePort]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
6 changes: 5 additions & 1 deletion docs/latest/api/structures/web-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ hide_title: false
* `defaultEncoding` string (optional) - Defaults to `ISO-8859-1`.
* `backgroundThrottling` boolean (optional) - Whether to throttle animations and timers
when the page becomes background. This also affects the
[Page Visibility API](latest/api/browser-window.md#page-visibility). Defaults to `true`.
[Page Visibility API](latest/api/browser-window.md#page-visibility). When at least one
[webContents](latest/api/web-contents.md) displayed in a single
[browserWindow](latest/api/browser-window.md) has disabled `backgroundThrottling` then
frames will be drawn and swapped for the whole window and other
[webContents](latest/api/web-contents.md) displayed by it. Defaults to `true`.
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
window. Defaults to `false`. See the
[offscreen rendering tutorial](latest/tutorial/offscreen-rendering.md) for
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/api/system-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ This API is only available on macOS 10.14 Mojave or newer.
* `window-background` - The background of a window.
* `window-frame-text` - The text in the window's titlebar area.

Returns `string` - The system color setting in RGB hexadecimal form (`#ABCDEF`).
Returns `string` - The system color setting in RGBA hexadecimal form (`#RRGGBBAA`).
See the [Windows docs][windows-colors] and the [macOS docs][macos-colors] for more details.

The following colors are only available on macOS 10.14: `find-highlight`, `selected-content-background`, `separator`, `unemphasized-selected-content-background`, `unemphasized-selected-text-background`, and `unemphasized-selected-text`.
Expand Down
13 changes: 11 additions & 2 deletions docs/latest/api/tray.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ Returns:

Emitted when the tray icon is double clicked.

#### Event: 'middle-click' _Windows_

Returns:

* `event` [KeyboardEvent](latest/api/structures/keyboard-event.md)
* `bounds` [Rectangle](latest/api/structures/rectangle.md) - The bounds of tray icon.

Emitted when the tray icon is middle clicked.

#### Event: 'balloon-show' _Windows_

Emitted when the tray balloon shows.
Expand Down Expand Up @@ -185,7 +194,7 @@ Returns:

Emitted when the mouse clicks the tray icon.

#### Event: 'mouse-enter' _macOS_
#### Event: 'mouse-enter' _macOS_ _Windows_

Returns:

Expand All @@ -194,7 +203,7 @@ Returns:

Emitted when the mouse enters the tray icon.

#### Event: 'mouse-leave' _macOS_
#### Event: 'mouse-leave' _macOS_ _Windows_

Returns:

Expand Down
3 changes: 2 additions & 1 deletion docs/latest/api/utility-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Process: [Main](latest/glossary.md#main-process)<br />
* `ignore`: equivalent to \['ignore', 'ignore', 'ignore']
* `inherit`: equivalent to \['ignore', 'inherit', 'inherit']
* `serviceName` string (optional) - Name of the process that will appear in `name` property of
[`child-process-gone` event of `app`](latest/api/app.md#event-child-process-gone).
[`ProcessMetric`](latest/api/structures/process-metric.md) returned by [`app.getAppMetrics`](latest/api/app.md#appgetappmetrics)
and [`child-process-gone` event of `app`](latest/api/app.md#event-child-process-gone).
Default is `Node Utility Process`.
* `allowLoadingUnsignedLibraries` boolean (optional) _macOS_ - With this flag, the utility process will be
launched via the `Electron Helper (Plugin).app` helper executable on macOS, which can be
Expand Down
Loading

0 comments on commit 08ca9ad

Please sign in to comment.