Permalink
Browse files

Fix player JS API compat with IE 8- for good

  • Loading branch information...
1 parent 8b27ba4 commit 728323270ba4ad7a205729b5fad6022f48e2e6b5 @rs rs committed Mar 8, 2012
Showing with 4 additions and 9 deletions.
  1. +0 −4 crossdomain.xml
  2. +4 −5 src/core/xdcom.js
View
4 crossdomain.xml
@@ -1,4 +0,0 @@
-<cross-domain-policy>
-<site-control permitted-cross-domain-policies="master-only"/>
-<allow-access-from domain="*" secure="false"/>
-</cross-domain-policy>
View
9 src/core/xdcom.js
@@ -50,7 +50,8 @@ DM.provide('XDCom',
'</object>';
}
- var container = document.createElement('div'),
+ var xdcom,
+ container = document.createElement('div'),
style = container.style;
style.position = 'absolute';
style.top = '-10000px';
@@ -60,14 +61,12 @@ DM.provide('XDCom',
window.onDMXDComMessage = messageHandler;
window.onDMXDComReady = function()
{
- // Do no use xdcom variable here to prevent from race condition under IE: when the
- // xdcom.swf file is cached, everything happen synchrone...
- document.getElementById('DMXDCom').addListener('onDMXDComMessage');
+ xdcom.addListener('onDMXDComMessage');
if (initedCallback) initedCallback();
};
container.innerHTML = html;
- var xdcom = document.getElementById('DMXDCom');
+ xdcom = document.getElementById('DMXDCom');
xdcom.connectionId = id;
return xdcom;

0 comments on commit 7283232

Please sign in to comment.