ElectronIpcMain.on method
ElectronIpcMain › on
Unofficial
Listens tochannel; when a new message arrives listener is called with listener(event, args...). Signature:
on(channel: string, listener: (event: ElectronIpcMainEvent, ...args: unknown[]) => void): thisParameters:
| Parameter | Type | Description |
|---|---|---|
| channel | string | The IPC channel name. |
| listener | (event: ElectronIpcMainEvent, ...args: unknown[]) => void | Callback invoked when a message is received. |
Returns: this — This IpcMain instance.