refactor: piggy-back on ELECTRON_BROWSER_SANDBOX_LOAD to get content scripts (#18823)
This commit is contained in:
parent
450aa33775
commit
edb56500c7
6 changed files with 17 additions and 12 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue