Merge pull request #11418 from electron/add-reg-defaults

[WIP] add back systemPreferences.registerDefaults()
This commit is contained in:
Charles Kerr 2017-12-13 15:48:20 -06:00 committed by GitHub
commit a8b76e1a80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 0 deletions

View file

@ -106,6 +106,12 @@ This is necessary for events such as `NSUserDefaultsDidChangeNotification`.
Same as `unsubscribeNotification`, but removes the subscriber from `NSNotificationCenter`.
### `systemPreferences.registerDefaults(defaults)` _macOS_
* `defaults` Object - a dictionary of (`key: value`) user defaults
Add the specified defaults to your application's `NSUserDefaults`.
### `systemPreferences.getUserDefault(key, type)` _macOS_
* `key` String