The goal of this repository is to try-out the postMessage API to communicate between parent-child iframes.
- index.html - The "parent" ifame;
- child.html - The "child" ifame.
$ npm i
$ npm start
The MESSAGE TO CHILD
call to action implementation benefits from the contentWindow.postMessage method to send the message to the child iframe.
The MESSAGE TO PARENT
call to action implementation benefits from the window.top.postMessage method to send the message to the parent iframe.