- What is cross window communication?
- How do you communicate between two iframes?
- How to send message from parent to iframe?
- What is window post?
What is cross window communication?
The “Same Origin” (same site) policy limits access of windows and frames to each other. The idea is that if a user has two pages open: one from john-smith.com , and another one is gmail.com , then they wouldn't want a script from john-smith.com to read our mail from gmail.com .
How do you communicate between two iframes?
Communicating directly between iframes is also possible by combining window. parent with target as defined above. In conclusion, the postMessage method is a more dynamic alternative to the single DOM, better suited if you load multiple pages in one iframe, but not always easier and it still requires the use of the DOM.
How to send message from parent to iframe?
Sending some data from the child iframe to the parent window is also pretty simple. Whenever you embed an iframe, the iframe will have a reference to the parent window. You just need to use the PostMessage API to send data via the window. parent reference of the parent window.
What is window post?
Post in a timber-framed building on either side of the window-aperture into which the window-frame is to be set.