electron/lib/browser/api/system-preferences.js
Shelley Vohr 1e3e5a6619
refactor: set appLevelAppearance prop on systemPreferences (#18477)
* refactor: set appLevelAppearance prop on systemPreferences

* ensure backwards compat is tested
2019-05-30 17:12:46 -07:00

15 lines
554 B
JavaScript

'use strict'
const { EventEmitter } = require('events')
const { deprecate } = require('electron')
const { systemPreferences, SystemPreferences } = process.electronBinding('system_preferences')
// SystemPreferences is an EventEmitter.
Object.setPrototypeOf(SystemPreferences.prototype, EventEmitter.prototype)
EventEmitter.call(systemPreferences)
if ('appLevelAppearance' in systemPreferences) {
deprecate.fnToProperty(systemPreferences, 'appLevelAppearance', '_getAppLevelAppearance', '_setAppLevelAppearance')
}
module.exports = systemPreferences