Is cross-origin postMessage broken in IE10?

后端 未结 8 2232
星月不相逢
星月不相逢 2020-11-27 11:06

I\'m trying to make a trivial postMessage example work...

  • in IE10
  • between windows/tabs (vs. iframes)
  • across origins

8条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 11:43

    Right now, (2014-09-02), Your best bet is to use a proxy frame as noted in the msdn blog post that details a workaround for this issue: https://blogs.msdn.microsoft.com/ieinternals/2009/09/15/html5-implementation-issues-in-ie8-and-later/

    Here's the working example: http://www.debugtheweb.com/test/xdm/origin/

    You need to set up a proxy frame on your page that has the same origin as the popup. Send information from the popup to the proxy frame using window.opener.frames[0]. Then use postMessage from the proxy frame to the main page.

提交回复
热议问题