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:
Samuel Maddock 2019-03-08 18:53:25 -05:00 committed by Samuel Attard
parent b7fc50b7ca
commit 8ee153dae1
11 changed files with 196 additions and 45 deletions

View file

@ -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) {