electron/lib/browser/api/screen.ts
Samuel Attard b02748e607
build: ensure that electron/lib/browser can only use browser or common imports (#24512)
* build: ensure that electron/lib/browser can only use browser or common imports

* chore: fix linting
2020-07-13 09:58:49 -07:00

10 lines
375 B
TypeScript

'use strict';
import { createLazyInstance } from '@electron/internal/browser/utils';
const { EventEmitter } = require('events');
const { Screen, createScreen } = process._linkedBinding('electron_common_screen');
// Screen is an EventEmitter.
Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype);
module.exports = createLazyInstance(createScreen, Screen, true);