
Exposing these in the renderer didn't make sense as they weren't backed by the same instance / value store. This API should be browser only especially now that we have nativeTheme.themeSource. Exposing in //common was a mistake from the beginning.
8 lines
254 B
TypeScript
8 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
|