We are aware of the cross-domain limitations associated with cross-window communication and the implementation of postMessage in HTML5.
However, we are wondering if there are other ways in which an iFrame can call JavaScript functions defined in its parent window.
We find postMessage a bit awkward to call multiple methods, each of which requires several parameters.
If HTML5 alternatives do not exist, bonus points for offering a solution in PhoneGap.
More on PhoneGap:
Embed the iFrame in the PhoneGap "index.html" page.
From "index.html" we can call JavaScript functions or access variables in an iFrame.
But we cannot call functions or access variables in "index.html" from an iFrame.
Is there something in PhoneGap that prevents this from working the other way around?
Thanks!
source share