feat: add support for content scripts 'all_frames' option (#17258)
* feat: add support for content scripts 'all_frames' option * merged content script tests 'all_frames' test now runs on all variants of sandbox/contentIsolation configurations :D
This commit is contained in:
parent
b7fc50b7ca
commit
8ee153dae1
11 changed files with 196 additions and 45 deletions
|
@ -69,6 +69,7 @@ const runAllStylesheet = function (css: Array<Electron.InjectionBase>) {
|
|||
// Run injected scripts.
|
||||
// https://developer.chrome.com/extensions/content_scripts
|
||||
const injectContentScript = function (extensionId: string, script: Electron.ContentScript) {
|
||||
if (!process.isMainFrame && !script.allFrames) return
|
||||
if (!script.matches.some(matchesPattern)) return
|
||||
|
||||
if (script.js) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue