ElectronWebFrameMain.postMessage method
ElectronWebFrameMain › postMessage
Unofficial
Sends a message to the renderer process, optionally transferring ownership ofMessagePortMain objects. Signature:
postMessage(channel: string, message: unknown, transfer?: ElectronMessagePortMain[] | undefined): voidParameters:
| Parameter | Type | Description |
|---|---|---|
| channel | string | The channel name. |
| message | unknown | The message to send. |
| transfer? | ElectronMessagePortMain[] | undefined | Message ports whose ownership is transferred with the message. |
Returns: void