Listen for devtools-opened on webContents

This commit is contained in:
Kevin Sawicki 2016-05-11 12:48:46 +02:00
parent c40fb67890
commit 1b2b7fc4ce

View file

@ -136,7 +136,7 @@ app.once('ready', function () {
init = BrowserWindow.prototype._init
BrowserWindow.prototype._init = function () {
init.call(this)
return this.on('devtools-opened', function () {
return this.webContents.on('devtools-opened', function () {
return this._loadDevToolsExtensions(Object.keys(extensionInfoMap).map(function (key) {
return extensionInfoMap[key]
}))