HTML5 post message API does not work in All IE versions for cross-domain JavaScript communication between browser tabs/windows.Alternatives like messageChannel API also does not work in this scenario.

Fixed Issue #798764

Details

Created
Sep 5, 2014
Privacy
This issue is public.
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

URL:

Repro Steps:

  1. setup two different domains eg. www.superb.com and www.awesome.com
  2. 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 .
  3. add the recieveMessage event listener in one domain say www.superb.com eg . window.addEventListener('message’, recieveMessage, false)
  4. 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

Expected Results:

The post message should work smoothly for cross domain communication between browser tabs/windows in IE.

Actual Results:

Dev Channel specific:

Yes

Attachments

0 attachments

    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:

      
      
      Parent window
      
      
      
      
      
      
      
      
      
      
      

      and the following child page:

      
      
      Child window
      
      
      
      
      
      
      
      
      
      

      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.

      thanks

    You need to sign in to your Microsoft account to add a comment.

    Sign in