electron/lib/browser/api/screen.ts

11 lines
375 B
TypeScript
Raw Normal View History

2020-03-20 20:28:31 +00:00
'use strict';
import { createLazyInstance } from '@electron/internal/browser/utils';
2020-03-20 20:28:31 +00:00
const { EventEmitter } = require('events');
const { Screen, createScreen } = process._linkedBinding('electron_common_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);