Accessing cross-domain iframes with content script

Kevin Jones kevinhowjones at gmail.com
Tue Oct 17 01:46:47 UTC 2017


Hello,

Reading the following doc:

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Content_scripts#Cross-domain_privileges

I get the impression that, using a content script, I should be able to get
access to the document in a web page's iframe, even if the src for the
iframe is in another domain, as long as I have provided sufficient
permissions.

I have a situation where I am trying to do just that, but am unsuccessful,
with iframe.contentDocument == null.  I can read other iframe's documents
where the src is in the same domain.

I have:

"permissions": [ "<all_urls>"],

set in my manifest.

Am I not interpreting the doc correctly on this?

ps, sorry for the repeat question (about 2 weeks ago) but I haven't been
able to find any help on this.

Thanks,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/dev-addons/attachments/20171016/941f8ad9/attachment-0001.html>


More information about the Dev-addons mailing list