💄 Standarize requires in JavaScript API
This commit is contained in:
parent
2317b56ac4
commit
0d3d097ce8
6 changed files with 10 additions and 13 deletions
|
@ -1,7 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const app = require('electron').app
|
||||
const BrowserWindow = require('electron').BrowserWindow
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const binding = process.atomBinding('dialog')
|
||||
const v8Util = process.atomBinding('v8_util')
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict'
|
||||
|
||||
const ipcMain = require('electron').ipcMain
|
||||
const {ipcMain} = require('electron')
|
||||
|
||||
// The history operation in renderer is redirected to browser.
|
||||
ipcMain.on('ELECTRON_NAVIGATION_CONTROLLER', function (event, method, ...args) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const EventEmitter = require('events').EventEmitter
|
||||
const powerMonitor = process.atomBinding('power_monitor').powerMonitor
|
||||
const {EventEmitter} = require('events')
|
||||
const {powerMonitor} = process.atomBinding('power_monitor')
|
||||
|
||||
Object.setPrototypeOf(powerMonitor, EventEmitter.prototype)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const EventEmitter = require('events').EventEmitter
|
||||
const screen = process.atomBinding('screen').screen
|
||||
const {EventEmitter} = require('events')
|
||||
const {screen} = process.atomBinding('screen')
|
||||
|
||||
Object.setPrototypeOf(screen, EventEmitter.prototype)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const EventEmitter = require('events').EventEmitter
|
||||
const Tray = process.atomBinding('tray').Tray
|
||||
const {EventEmitter} = require('events')
|
||||
const {Tray} = process.atomBinding('tray')
|
||||
|
||||
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
'use strict'
|
||||
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
const ipcMain = require('electron').ipcMain
|
||||
const NavigationController = require('electron').NavigationController
|
||||
const Menu = require('electron').Menu
|
||||
const {EventEmitter} = require('events')
|
||||
const {ipcMain, Menu, NavigationController} = require('electron')
|
||||
|
||||
const binding = process.atomBinding('web_contents')
|
||||
const debuggerBinding = process.atomBinding('debugger')
|
||||
|
|
Loading…
Reference in a new issue