hookWindowForTabEvents -> hookWebContentsForTabEvents
This commit is contained in:
parent
11e68ff932
commit
4823a04a44
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ const removeBackgroundPages = function (manifest) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dispatch tabs events.
|
// Dispatch tabs events.
|
||||||
const hookWindowForTabEvents = function (webContents) {
|
const hookWebContentsForTabEvents = function (webContents) {
|
||||||
const tabId = webContents.id
|
const tabId = webContents.id
|
||||||
for (const page of objectValues(backgroundPages)) {
|
for (const page of objectValues(backgroundPages)) {
|
||||||
page.webContents.sendToAll('CHROME_TABS_ONCREATED', tabId)
|
page.webContents.sendToAll('CHROME_TABS_ONCREATED', tabId)
|
||||||
|
@ -225,7 +225,7 @@ const loadDevToolsExtensions = function (win, manifests) {
|
||||||
webContents.on('web-contents-created', function (webContents) {
|
webContents.on('web-contents-created', function (webContents) {
|
||||||
if (webContents.getType() === 'remote') return
|
if (webContents.getType() === 'remote') return
|
||||||
|
|
||||||
hookWindowForTabEvents(webContents)
|
hookWebContentsForTabEvents(webContents)
|
||||||
webContents.on('devtools-opened', function () {
|
webContents.on('devtools-opened', function () {
|
||||||
loadDevToolsExtensions(webContents, objectValues(manifestMap))
|
loadDevToolsExtensions(webContents, objectValues(manifestMap))
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue