Happy new year 🙂
I have a Chrome extension which is a popup that contains an iframe, inside that iframe i load a whole web app. my question is
- How can i communicate with the code inside that iframe form popup.html or from the background page? I would need to either read DOM elements inside that iframe or better be able to make js calls to different methods.
Thanks for all the help!
Use a content script that loads inside that frame. They can access the DOM of that page and make calls to the background page, though it’s a bit harder to be able to communicate with the JavaScript on that page – but DOM elements should be fine if you control both the iframe and the extension.
See http://code.google.com/chrome/extensions/content_scripts.html