简体   繁体   中英

child.postMessage not working in IE11 compatible web application in Microsoft Edge

I am trying to communicate between a IE 11 compatible web application and pop-up window opened using window.open. Below is the code I am using in IE11 compatible web application:

var options = 'titlebar=no,resizable=no';
var url = '<different app url but within same org>';
var child = window.open(url,'window',options);
child.postMessage({message: 'requestResult'},'*');

This is working in chrome and IE, but it's failing in Microsoft Edge. I cannot receive message in child popup window in Edge. Can anyone please check and let me know why it's failing in Edge.

I think the page opened by window.open() should be running in Edge instead of Edge IE mode. If this is the case, you need to configure the opened page in the Edge IE mode site list to achieve your needs.

You can even simply try to output the child window handle: child object. You will find that it is Null instead of [window object]. This is because the two pages are running in different browsers (IE and Edge).

For more details about how to Configure IE mode, you could refer to this doc: Configure IE mode policies .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM