electron/lib/browser/api/screen.ts

11 lines
336 B
TypeScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
'use strict';
2020-03-20 20:28:31 +00:00
import { createLazyInstance } from '../utils';
const { EventEmitter } = require('events');
const { Screen, createScreen } = process.electronBinding('screen');
// Screen is an EventEmitter.
2020-03-20 20:28:31 +00:00
Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype);
2020-03-20 20:28:31 +00:00
module.exports = createLazyInstance(createScreen, Screen, true);