Only add extensions to non-remote webContents
This commit is contained in:
parent
c8c60dd313
commit
11e68ff932
3 changed files with 15 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue