Move session-created event to app
This follows the convention of other *-created events.
This commit is contained in:
parent
45500701f1
commit
d739d8772c
2 changed files with 7 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
const {app, ipcMain, session, webContents, BrowserWindow} = require('electron')
|
||||
const {app, ipcMain, webContents, BrowserWindow} = require('electron')
|
||||
const {getAllWebContents} = process.atomBinding('web_contents')
|
||||
const renderProcessPreferences = process.atomBinding('render_process_preferences').forAllWebContents()
|
||||
|
||||
|
@ -333,7 +333,7 @@ app.once('ready', function () {
|
|||
}
|
||||
})
|
||||
}
|
||||
session.on('session-created', function (ses) {
|
||||
app.on('session-created', function (ses) {
|
||||
ses.protocol.registerBufferProtocol('chrome-extension', chromeExtensionHandler, function (error) {
|
||||
if (error) {
|
||||
console.error(`Unable to register chrome-extension protocol: ${error}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue