diff --git a/docs/latest/.sha b/docs/latest/.sha index 00de905f7..33dbe9847 100644 --- a/docs/latest/.sha +++ b/docs/latest/.sha @@ -1 +1 @@ -347fd37dfbf089f2d66aebd0811672d93f49bb6f \ No newline at end of file +6ee299c9eec451d1efcab4be09c3b3e4a028d2c9 \ No newline at end of file diff --git a/docs/latest/api/clipboard.md b/docs/latest/api/clipboard.md index aeefb2c15..17eb33559 100644 --- a/docs/latest/api/clipboard.md +++ b/docs/latest/api/clipboard.md @@ -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: diff --git a/docs/latest/api/crash-reporter.md b/docs/latest/api/crash-reporter.md index b2f1f3ec0..b8e058532 100644 --- a/docs/latest/api/crash-reporter.md +++ b/docs/latest/api/crash-reporter.md @@ -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: diff --git a/docs/latest/api/ipc-renderer.md b/docs/latest/api/ipc-renderer.md index 6cddcc8a8..951965c2e 100644 --- a/docs/latest/api/ipc-renderer.md +++ b/docs/latest/api/ipc-renderer.md @@ -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 diff --git a/docs/latest/api/native-image.md b/docs/latest/api/native-image.md index 042da6cc9..38c1640f5 100644 --- a/docs/latest/api/native-image.md +++ b/docs/latest/api/native-image.md @@ -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]. diff --git a/docs/latest/api/web-frame.md b/docs/latest/api/web-frame.md index 8f6aa76bc..eb3f0f759 100644 --- a/docs/latest/api/web-frame.md +++ b/docs/latest/api/web-frame.md @@ -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`). @@ -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`. @@ -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 diff --git a/docs/latest/api/web-utils.md b/docs/latest/api/web-utils.md index 60566e084..57e688767 100644 --- a/docs/latest/api/web-utils.md +++ b/docs/latest/api/web-utils.md @@ -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: