Skip to content

ElectronIpcMain.on method

ElectronIpcMain › on

Unofficial

Listens to channel; when a new message arrives listener is called with listener(event, args...).

Signature:

on(channel: string, listener: (event: ElectronIpcMainEvent, ...args: unknown[]) => void): this

Parameters:

Parameter Type Description
channel string The IPC channel name.
listener (event: ElectronIpcMainEvent, ...args: unknown[]) => void Callback invoked when a message is received.

Returns: thisThis IpcMain instance.