ElectronWebFrameMain
Unofficial
A frame in the main process, representing a renderer frame.
Note: The upstream static fromId(processId, routingId) factory cannot be expressed on a plain interface and is therefore omitted here.
Import:
import type { ElectronWebFrameMain } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ElectronWebFrameMainProperties
| Property | Type | Description | |
|---|---|---|---|
| frames | ElectronWebFrameMain[] | A collection containing the direct descendents of this frame. | |
| framesInSubtree | ElectronWebFrameMain[] | A collection containing every frame in the subtree of this frame, including itself. | |
| frameTreeNodeId | number | The id of the frame's internal FrameTreeNode instance. Browser-global and uniquely identifies a frame that hosts content. | |
| name | string | The frame name. | |
| osProcessId | number | The operating system pid of the process which owns this frame. | |
| parent | ElectronWebFrameMain | null | The parent frame, or null if this is the top frame in the frame hierarchy. | |
| processId | number | The Chromium internal pid of the process which owns this frame. | |
| routingId | number | The unique frame id in the current renderer process. | |
| top | ElectronWebFrameMain | null | The top frame in the frame hierarchy to which this frame belongs, or null. | |
| url | string | The current URL of the frame. | |
| visibilityState | string | The visibility state of the frame. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addListener(event, listener) | this | Registers a listener for the dom-ready event, emitted when the document is loaded. | |
| executeJavaScript(code, userGesture?) | Promise<unknown> | Evaluates code in the page. | |
| on('dom-ready', listener) | this | Registers a listener for the dom-ready event, emitted when the document is loaded. | |
| once(event, listener) | this | Registers a one-time listener for the dom-ready event. | |
| postMessage(channel, message, transfer?) | void | Sends a message to the renderer process, optionally transferring ownership of MessagePortMain objects. | |
| reload() | boolean | Reloads the frame. | |
| removeListener(event, listener) | this | Removes a previously registered dom-ready event listener. | |
| send(channel, args?) | void | Sends an asynchronous message to the renderer process via channel, along with arguments. |
Links to this page:
- ElectronBluetoothPairingHandlerHandlerDetails
- ElectronContextMenuParams
- ElectronDevicePermissionHandlerHandlerDetails
- ElectronFrameCreatedDetails
- ElectronHidDeviceAddedDetails
- ElectronHidDeviceRemovedDetails
- ElectronIpcMainEvent
- ElectronIpcMainInvokeEvent
- ElectronOnBeforeRedirectListenerDetails
- ElectronOnBeforeRequestListenerDetails
- ElectronOnBeforeSendHeadersListenerDetails
- ElectronOnCompletedListenerDetails
- ElectronOnErrorOccurredListenerDetails
- ElectronOnHeadersReceivedListenerDetails
- ElectronOnResponseStartedListenerDetails
- ElectronOnSendHeadersListenerDetails
- ElectronSelectHidDeviceDetails
- ElectronWebContents
- ElectronWebFrameMainModule