Suppose Google Chrome has 2 extensions installed.
The 1st extension launches content.js on w3.org:
manifest.json:
"content_scripts": [{ "matches": [ "https://www.w3.org/*" ], "all_frames": true, "js": [ "content.js" ] }]
content.js:
alert('content');
The second extension has page.html, which loads w3.org in an iframe:
manifest.json:
"web_accessible_resources": ["page.html"]
page.html:
<!DOCTYPE html> <iframe src="https://www.w3.org/"></iframe>
Now enter the address bar chrome-extension://2nd-extension-id/page.html
. You will see w3.com, but content.js has not been started (no alert()
). I do not see errors in the console.
Question: how to allow script content to run in this iframe?
I created a Chrome issue . Status: WontFix, unfortunately. But this may be changed in the future ...
source share