Skip to content

ElectronNotification.on('action') method

ElectronNotification › on(‘action’)

Unofficial

Registers an event listener that is invoked when one of the notification's actions is activated.

Signature:

on(event: "action", listener: (event: ElectronEvent, index: number) => void): this

Parameters:

ParameterTypeDescription
event"action"The event name.
listener(event: ElectronEvent, index: number) => voidThe event handler receiving the event and the index of the activated action.

Returns: thisThis notification instance.