Can I access the content of an iframe in JavaScript that is part of a Google Chrome extension?
I have an iframe within the main window named "test_ifram开发者_高级运维e". I want to access the content of "test_iframe" within a Google Chrome extension. I understand that I can do this if I have requisite permissions given in manifest.json
.
Can I access the content of this iframe from a background HTML page? Or can I access it in a content script which is part of that extension? (In the latter case I suppose I have to pass the iframe content from the content script to a background page as part of a message for further processing(?))
Let's say this test_iframe
comes from http://frame.example.com
. I would just inject a content script directly to frame.example.com
(instead of the parent page) and do everything there.
精彩评论