ElectronSystemPreferences.subscribeWorkspaceNotification method
ElectronSystemPreferences › subscribeWorkspaceNotification
Unofficial
Same assubscribeNotification, but uses NSWorkspace.sharedWorkspace.notificationCenter. If event is null, the NSWorkspaceNotificationCenter doesn't use it as criteria for delivery to the observer.Signature:
subscribeWorkspaceNotification($event: string | null, callback: ($event: string, userInfo: Record<string, unknown>, $object: string) => void): numberParameters:
| Parameter | Type | Description |
|---|---|---|
| $event | string | null | |
| callback | ($event: string, userInfo: Record<string, unknown>, $object: string) => void | Called when the corresponding event happens. |
Returns: number — The ID of this subscription.
Platform: darwin.