Add systemPreferences.subscribeLocalNotification. (#6150)

This commit is contained in:
Charlie Hess 2016-06-20 17:48:42 -07:00 committed by Cheng Zhao
parent 1837a938a1
commit 74321dce74
4 changed files with 71 additions and 23 deletions

View file

@ -40,6 +40,17 @@ example values of `event` are:
Removes the subscriber with `id`.
### `systemPreferences.subscribeLocalNotification(event, callback)` _macOS_
Same as `subscribeNotification`, but uses `NSNotificationCenter` for local defaults.
This is necessary for events such as:
* `NSUserDefaultsDidChangeNotification`
### `systemPreferences.unsubscribeLocalNotification(id)` _macOS_
Same as `unsubscribeNotification`, but removes the subscriber from `NSNotificationCenter`.
### `systemPreferences.getUserDefault(key, type)` _macOS_
* `key` String