Skip to content

ElectronIpcMain.handleOnce method

ElectronIpcMain › handleOnce

Unofficial

Handles a single invokeable IPC message, then removes the listener. See ipcMain.handle(channel, listener).

Signature:

handleOnce(channel: string, listener: (event: ElectronIpcMainInvokeEvent, ...args: unknown[]) => unknown): void

Parameters:

ParameterTypeDescription
channelstringThe IPC channel name.
listener(event: ElectronIpcMainInvokeEvent, ...args: unknown[]) => unknownCallback invoked to handle the message.

Returns: void