Steps to reproduce
- setup two different domains eg. www.superb.com and www.awesome.com
- setup one domain as a parent tab/window say www.superb.com ,and using a user href to another domain say www.awesome.com open the other domain in a new tab/window .
- add the recieveMessage event listener in one domain say www.superb.com eg . window.addEventListener('message’, recieveMessage, false)
- try to send a message from the child tab/window (in another domain www.awesome.com) to the parent tab/window say www.superb.com using the postMessage API.
This should work like it does in all other browsers supporting HTML5 postMessage API’s
The post message should work smoothly for cross domain communication between browser tabs/windows in IE.
Dev Channel specific:
Comments and activity
- Microsoft Edge Team
Changed Assigned To to “Tony S.”
Changed Assigned To from “Tony S.” to “Travis L.”
Changed Assigned To from “Travis L.” to “Nirankush P.”
Changed Assigned To from “Nirankush P.” to “Sam F.”
Changed Status to “Confirmed”
Changed Assigned To from “Sam F.” to “IE F.”
Changed Status from “Confirmed” to “Fixed”
Changed Assigned To to “Bogdan B.”
this issue is marked as resolved but I am finding that the first postMessage issued from a child window to the parent doesn’t consistently dispatch.
for example, I have the following parent page:
and the following child page:
what should happen is that upon clicking the button in the parent document, a new (child) window should be opened. upon loading the child window should post a message to the parent window, which will generate an alert. this is not happening, however, unless I click the button again (launching a second child window), at which point I get the alert I expected to indicate the page is loaded and subsequently, the parent document will post a message to the child and an alert will be present in the child window.
because it felt like a timing issue I tried to experiment with using setTimeout (at 0, 1000 and 10000 thresholds) and window.opener.postMessage, but the behavior remains the same (first child window does not post the message; subsequently launched child windows do).
it feels to me now that there is still a small bug left with this implementation. it is only an issue when opening a cross-origin resource via window.open – when using an iframe instead of window.open, this effect is not exhibited.
can someone at please confirm this is a bug (even if there will be no effort made to address it given Edge’s ascension)? we still have customers that prefer IE and I need to determine how best to workaround this issue.