I'm working on a simple Chrome extensions that alters an existing webpage. Unfortunately the webpage uses some iframes which makes it a bit more difficult to access the DOM.
I want to access the elements from "mainFrame" but it's content seem to be generated dynamically (not really sure how this works). The src refers to 'blank.htm' which is empty. If I use
<frame src="blank.htm" name="mainFrame" id="mainFrame" title="mainFrame" />
Iframe dom contents are not accessible from the parent document. Only thing you can do is the reverse one, yaah you can access the parent document's DOM from iframe. Those are all restricted due to security reasons. But you can access them from chrome extension functions(if you are working for chrome extensions).
For more details about accessing iframe content in chrome extension please follow the link