Skip to content

ElectronWebContents.sendToFrame method

ElectronWebContents › sendToFrame

Unofficial

Sends an asynchronous message to a specific frame in a renderer process via channel.

Signature:

sendToFrame(frameId: number | [number, number], channel: string, args?: unknown[]): void

Parameters:

Parameter Type Description
frameId number | [number, number] The frame id, or a [processId, frameId] pair.
channel string The channel name.
args? unknown[] Arguments to serialize and send.

Returns: void