move protocol to session properties for working with partitions
This commit is contained in:
parent
0e0235407b
commit
aa853dd3be
6 changed files with 74 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
const {app} = require('electron')
|
||||
const {createProtocolObject, registerStandardSchemes} = process.atomBinding('protocol')
|
||||
const {app, session} = require('electron')
|
||||
const {registerStandardSchemes} = process.atomBinding('protocol')
|
||||
|
||||
exports.registerStandardSchemes = function (schemes) {
|
||||
if (app.isReady()) {
|
||||
|
@ -10,7 +10,7 @@ exports.registerStandardSchemes = function (schemes) {
|
|||
}
|
||||
|
||||
app.once('ready', function () {
|
||||
let protocol = createProtocolObject()
|
||||
let protocol = session.defaultSession.protocol
|
||||
for (let method in protocol) {
|
||||
exports[method] = protocol[method].bind(protocol)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue