allow protocol module initialization before app ready.
* ensure registerStandardSchemes can only be called before app ready * ensure other protocol methods can only be used after app ready
This commit is contained in:
parent
1ff33b7c81
commit
0f2ae385ed
5 changed files with 66 additions and 25 deletions
|
@ -6,6 +6,7 @@ const app = electron.app
|
|||
const ipcMain = electron.ipcMain
|
||||
const dialog = electron.dialog
|
||||
const BrowserWindow = electron.BrowserWindow
|
||||
const protocol = electron.protocol
|
||||
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
@ -71,6 +72,10 @@ if (global.isCi) {
|
|||
})
|
||||
}
|
||||
|
||||
// Register app as standard scheme.
|
||||
global.standardScheme = 'app'
|
||||
protocol.registerStandardSchemes([global.standardScheme])
|
||||
|
||||
app.on('window-all-closed', function () {
|
||||
app.quit()
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue