Problems with window.postMessage on Chrome
问题 I have been stuck on this for hours. I have a.html on http://example.com that contains an iframe with src to b.html on http://subdomain.example.com. a.html has some JS code to postMessage to the iframe. The code to postMessage is simple: iframe_window.postMessage('message', iframe_element.src) But this way, Chrome throws an error: Unable to post message to http://subdomain.example.com. Recipient has origin null. I have also tried: iframe_window.postMessage('message', 'http://subdomain.example