delay protocol object creation
This commit is contained in:
parent
9c71c9fa6a
commit
70dac71639
4 changed files with 52 additions and 85 deletions
|
@ -1,5 +1,4 @@
|
|||
const electron = require('electron')
|
||||
const app = electron.app
|
||||
const {app, protocol, BrowserWindow} = require('electron')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const url = require('url')
|
||||
|
@ -70,9 +69,7 @@ app.on('will-quit', function () {
|
|||
|
||||
// We can not use protocol or BrowserWindow until app is ready.
|
||||
app.once('ready', function () {
|
||||
var BrowserWindow, chromeExtensionHandler, i, init, len, protocol, srcDirectory
|
||||
protocol = electron.protocol
|
||||
BrowserWindow = electron.BrowserWindow
|
||||
var chromeExtensionHandler, i, init, len, srcDirectory
|
||||
|
||||
// Load persisted extensions.
|
||||
loadedExtensionsPath = path.join(app.getPath('userData'), 'DevTools Extensions')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue