Export loadDevToolsExtensions API to use in guest view manager
This commit is contained in:
parent
219d177731
commit
ec8b9e3f35
2 changed files with 12 additions and 11 deletions
|
@ -317,13 +317,13 @@ app.once('ready', function () {
|
|||
const init = BrowserWindow.prototype._init
|
||||
BrowserWindow.prototype._init = function () {
|
||||
init.call(this)
|
||||
this._loadDevToolsExtensions(this.webContents)
|
||||
}
|
||||
|
||||
BrowserWindow.prototype._loadDevToolsExtensions = function (webContents) {
|
||||
hookWindowForTabEvents(webContents)
|
||||
webContents.on('devtools-opened', function () {
|
||||
loadDevToolsExtensions(webContents, objectValues(manifestMap))
|
||||
})
|
||||
exports.loadDevToolsExtensions(this.webContents)
|
||||
}
|
||||
})
|
||||
|
||||
exports.loadDevToolsExtensions = function (webContents) {
|
||||
hookWindowForTabEvents(webContents)
|
||||
webContents.on('devtools-opened', function () {
|
||||
loadDevToolsExtensions(webContents, objectValues(manifestMap))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue