Merge pull request #5490 from electron/webcontents-event

Listen for devtools-opened on webContents
This commit is contained in:
Cheng Zhao 2016-05-11 19:59:09 +09:00
commit b2d83fd8a8

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', () => {
return this._loadDevToolsExtensions(Object.keys(extensionInfoMap).map(function (key) {
return extensionInfoMap[key]
}))