refactor: piggy-back on ELECTRON_BROWSER_SANDBOX_LOAD to get content scripts (#18823)

This commit is contained in:
Milan Burda 2019-06-19 17:23:44 +02:00 committed by Alexey Kuzmin
parent 450aa33775
commit edb56500c7
6 changed files with 17 additions and 12 deletions

View file

@ -312,9 +312,9 @@ ipcMainUtils.handle('CHROME_TABS_EXECUTE_SCRIPT', async function (event, tabId,
return ipcMainUtils.invokeInWebContents(contents, false, 'CHROME_TABS_EXECUTE_SCRIPT', extensionId, url, code)
})
ipcMainUtils.handle('CHROME_GET_CONTENT_SCRIPTS', async (event) => {
exports.getContentScripts = () => {
return Object.values(contentScripts)
})
}
// Transfer the content scripts to renderer.
const contentScripts = {}