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

@ -30,7 +30,7 @@ const { ipcRendererInternal } = require('@electron/internal/renderer/ipc-rendere
const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils')
const {
preloadScripts, isRemoteModuleEnabled, isWebViewTagEnabled, process: processProps
contentScripts, preloadScripts, isRemoteModuleEnabled, isWebViewTagEnabled, process: processProps
} = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_SANDBOX_LOAD')
process.isRemoteModuleEnabled = isRemoteModuleEnabled
@ -124,7 +124,7 @@ switch (window.location.protocol) {
}
default: {
// Inject content scripts.
require('@electron/internal/renderer/content-scripts-injector')()
require('@electron/internal/renderer/content-scripts-injector')(contentScripts)
}
}