Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/latest/.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
347fd37dfbf089f2d66aebd0811672d93f49bb6f
6ee299c9eec451d1efcab4be09c3b3e4a028d2c9
6 changes: 6 additions & 0 deletions docs/latest/api/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ hide_title: false

Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

On Linux, there is also a `selection` clipboard. To manipulate it
you need to pass `selection` to each method:

Expand Down
6 changes: 6 additions & 0 deletions docs/latest/api/crash-reporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ hide_title: false

Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

The following is an example of setting up Electron to automatically submit
crash reports to a remote server:

Expand Down
6 changes: 6 additions & 0 deletions docs/latest/api/ipc-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ changes:

Process: [Renderer](../glossary.md#renderer-process)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

The `ipcRenderer` module is an [EventEmitter][event-emitter]. It provides a few
methods so you can send synchronous and asynchronous messages from the render
process (web page) to the main process. You can also receive replies from the
Expand Down
6 changes: 6 additions & 0 deletions docs/latest/api/native-image.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ hide_title: false

Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

The `nativeImage` module provides a unified interface for manipulating
system images. These can be handy if you want to provide multiple scaled
versions of the same icon or take advantage of macOS [template images][template-image].
Expand Down
10 changes: 8 additions & 2 deletions docs/latest/api/web-frame.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ hide_title: false

Process: [Renderer](../glossary.md#renderer-process)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

`webFrame` export of the Electron module is an instance of the `WebFrame`
class representing the current frame. Sub-frames can be retrieved by
certain properties and methods (e.g. `webFrame.firstChild`).
Expand Down Expand Up @@ -146,7 +152,7 @@ by its key, which is returned from `webFrame.insertCSS(css)`.

Inserts `text` to the focused element.

### `webFrame.executeJavaScript(code[, userGesture, callback])`
### `webFrame.executeJavaScript(code[, userGesture][, callback])`

* `code` string
* `userGesture` boolean (optional) - Default is `false`.
Expand All @@ -167,7 +173,7 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
this limitation.

### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture, callback])`
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture][, callback])`

* `worldId` Integer - The ID of the world to run the javascript
in, `0` is the default main world (where content runs), `999` is the
Expand Down
6 changes: 6 additions & 0 deletions docs/latest/api/web-utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ hide_title: false

Process: [Renderer](../glossary.md#renderer-process)

> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

## Methods

The `webUtils` module has the following methods:
Expand Down