Only add extensions to non-remote webContents

This commit is contained in:
Kevin Sawicki 2016-06-08 11:41:14 -07:00
parent c8c60dd313
commit 11e68ff932
3 changed files with 15 additions and 1 deletions

View file

@ -223,6 +223,8 @@ const loadDevToolsExtensions = function (win, manifests) {
}
webContents.on('web-contents-created', function (webContents) {
if (webContents.getType() === 'remote') return
hookWindowForTabEvents(webContents)
webContents.on('devtools-opened', function () {
loadDevToolsExtensions(webContents, objectValues(manifestMap))
@ -304,7 +306,9 @@ app.once('ready', function () {
const manifest = getManifestFromPath(srcDirectory)
if (manifest) {
for (const webContents of getAllWebContents()) {
loadDevToolsExtensions(webContents, [manifest])
if (webContents.getType() !== 'remote') {
loadDevToolsExtensions(webContents, [manifest])
}
}
return manifest.name
}