Skip to content

ElectronSystemPreferences.subscribeLocalNotification method

ElectronSystemPreferences › subscribeLocalNotification

Unofficial

Same as subscribeNotification, but uses NSNotificationCenter for local defaults. If event is null, the NSNotificationCenter doesn't use it as criteria for delivery to the observer.

Signature:

subscribeLocalNotification($event: string | null, callback: ($event: string, userInfo: Record<string, unknown>, $object: string) => void): number

Parameters:

ParameterTypeDescription
$eventstring | null
callback($event: string, userInfo: Record<string, unknown>, $object: string) => voidCalled when the corresponding event happens.

Returns: number — The ID of this subscription.

Platform: darwin.