Explicitly initialize session before webContents

This commit is contained in:
Cheng Zhao 2016-06-01 14:57:35 +09:00
parent 523e8c2e1c
commit 5bb8da6073
2 changed files with 8 additions and 3 deletions

View file

@ -1,6 +1,7 @@
'use strict'
const {deprecate, Menu, session} = require('electron')
const electron = require('electron')
const {deprecate, Menu} = electron
const {EventEmitter} = require('events')
const bindings = process.atomBinding('app')
@ -49,7 +50,7 @@ app.allowNTLMCredentialsForAllDomains = function (allow) {
if (!this.isReady()) {
this.commandLine.appendSwitch('auth-server-whitelist', domains)
} else {
session.defaultSession.allowNTLMCredentialsForDomains(domains)
electron.session.defaultSession.allowNTLMCredentialsForDomains(domains)
}
}