I have a problem. Earlier I was having a hard time sending a postMessage from the iframe to the parent node. Fortunately, I solved it because somehow window.parent.postMessage didn't work but top.postMessage did work. Now I'm having the opposite problem. I want to postMessage from the parent to the iframe doing myIframe.contentWindow.postMessage but it doesn't work. Is there something else I could try?
I'm testing in localhost, one is at localhost:3000 and the other at localhost:9001
Reference: https://www.w3schools.com/howto/howto_js_element_iframe.asp