electron/lib/browser/api/native-theme.ts
Shelley Vohr 659e79fc08
refactor: prevent consistent early exception (#24191)
* refactor: prevent consistent early exception

* Use _linkedBinding where possible

* Remove dead electronBinding
2020-06-22 20:32:45 -07:00

8 lines
274 B
TypeScript

import { EventEmitter } from 'events';
const { NativeTheme, nativeTheme } = process._linkedBinding('electron_common_native_theme');
Object.setPrototypeOf(NativeTheme.prototype, EventEmitter.prototype);
EventEmitter.call(nativeTheme as any);
module.exports = nativeTheme;