Skip to content

ElectronNotification.on('failed') method

ElectronNotification › on(‘failed’)

Unofficial

Registers an event listener that is invoked when an error is encountered while creating and showing the native notification. win32 only.

Signature:

on(event: "failed", listener: (event: ElectronEvent, error: string) => void): this

Parameters:

Parameter Type Description
event "failed" The event name.
listener (event: ElectronEvent, error: string) => void The event handler receiving the event and the error encountered during execution of the show() method.

Returns: thisThis notification instance.