Internet Explorer 9 policy setting affects window.postMessage

I have window.postMessage in a JavaScript file. This seems to be a bug in IE9 due to some policy settings. I canโ€™t understand what kind of policy. Does anyone have any ideas which ones might be?

+4
source share
2 answers

I believe the key you are looking for is:

HKEY_CURRENT_USER \ Software \ Policies \ Microsoft \ Internet Explorer \ Main \ FeatureControl \ FEATURE_CROSS_DOCUMENT_MESSAGING

If the above registry key is installed, then IE (all versions of what I can say) will return undefined for the window.postMessage function.

+4
source

Let me clarify beyond the comments. As you can see here:

http://javascript.info/tutorial/cross-window-messaging-with-postmessage

If I use regular IE9 at home or the one located on browserstack.com, the message loads normally inside the iframe. If I use our Intranet IE9, I get the following error in the JS Console:

 SCRIPT16385: Not implemented cross-window-messaging-with-postmessage, line 1 character 1 SCRIPT1002: Syntax error all.js, line 1 character 1 

It would seem that some security settings prevent the call to postMessage.

+3
source

All Articles