mirror of
https://github.com/electron/electron.git
synced 2026-01-28 08:48:14 -05:00
* feat: add new nativeTheme API * chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module * chore: clean up and deprecate things per feedback * chore: add tests for deprecate and clean up invert impl * build: when is a boolean not a boolean???
9 lines
254 B
TypeScript
9 lines
254 B
TypeScript
import { EventEmitter } from 'events'
|
|
|
|
const { NativeTheme, nativeTheme } = process.electronBinding('native_theme')
|
|
|
|
Object.setPrototypeOf(NativeTheme.prototype, EventEmitter.prototype)
|
|
EventEmitter.call(nativeTheme as any)
|
|
|
|
module.exports = nativeTheme
|