Renderer Module
Types and nested modules
| Type/Module | Description |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ❌ |
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ✔ | Exported ❌ |
|
|
⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ❌### WarningElectron's webview tag is based on Chromium's webview, which is undergoing dramatic architectural changes. This impacts the stability of
webviews, including rendering, navigation, and event routing. We currently recommend to not use the webview tag and to consider alternatives,
like iframe, a WebContentsView, or an architecture that avoids embedded content altogether.### EnablingBy default the webview tag is disabled in
Electron >= 5. You need to enable the tag by setting the webviewTag webPreferences option when constructing your BrowserWindow.
For more information see the BrowserWindow constructor docs.### Overview> Display external web content in an isolated frame and process.Process: Renderer
_This class is not exported from the 'electron' module. It is only available as a return value of other methods
in the Electron API._Use the webview tag to embed 'guest' content (such as web pages) in your Electron app. The
guest content is contained within the webview container. An embedded page within your app controls how the guest content is
laid out and rendered.Unlike an iframe, the webview runs in a separate process than your app. It doesn't have the
same permissions as your web page and all interactions between your app and embedded content will be asynchronous. This keeps
your app safe from the embedded content.> [!NOTE] Most methods called on the webview from the host page require a
synchronous call to the main process.### ExampleTo embed a web page in your app, add the webview tag to your
app's embedder page (this is the app page that will display the guest content). In its simplest form, the webview
tag includes the src of the web page and css styles that control the appearance of the webview container: |
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ✔### ipcRenderer> Communicate asynchronously from a renderer process to the main process.Process: Renderer> [!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 it using the contextBridge API.The ipcRenderer module is an EventEmitter. 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 main process.See IPC tutorial for code examples. |
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ✔ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ✔
|
|
|
⚠ Process Availability: Main ❌ | Renderer ✔ | Utility ❌ | Exported ✔
|
fable-electron-docs-api