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:

ParameterTypeDescription
frameIdnumber | [number, number]The frame id, or a [processId, frameId] pair.
channelstringThe channel name.
args?unknown[]Arguments to serialize and send.

Returns: void