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:

ParameterTypeDescription
$event"failed"
listener($event: ElectronEvent, error: string) => voidThe event handler receiving the event and the error encountered during execution of the show() method.

Returns: this — This notification instance.