Skip to content

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 ElectronWebFrameMain

Properties

PropertyTypeDescription
framesElectronWebFrameMain[]A collection containing the direct descendents of this frame.
framesInSubtreeElectronWebFrameMain[]A collection containing every frame in the subtree of this frame, including itself.
frameTreeNodeIdnumberThe id of the frame's internal FrameTreeNode instance. Browser-global and uniquely identifies a frame that hosts content.
namestringThe frame name.
osProcessIdnumberThe operating system pid of the process which owns this frame.
parentElectronWebFrameMain | nullThe parent frame, or null if this is the top frame in the frame hierarchy.
processIdnumberThe Chromium internal pid of the process which owns this frame.
routingIdnumberThe unique frame id in the current renderer process.
topElectronWebFrameMain | nullThe top frame in the frame hierarchy to which this frame belongs, or null.
urlstringThe current URL of the frame.
visibilityStatestringThe visibility state of the frame.

Methods

MethodReturnsDescription
addListener(event, listener)thisRegisters 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)thisRegisters a listener for the dom-ready event, emitted when the document is loaded.
once(event, listener)thisRegisters a one-time listener for the dom-ready event.
postMessage(channel, message, transfer?)voidSends a message to the renderer process, optionally transferring ownership of MessagePortMain objects.
reload()booleanReloads the frame.
removeListener(event, listener)thisRemoves a previously registered dom-ready event listener.
send(channel, args?)voidSends an asynchronous message to the renderer process via channel, along with arguments.

Links to this page: