The following JavaScript works fine in MediaWiki 1.17.1, when placed into a
ResourceLoader-loaded module, producing an alert box:
addHandler(window, 'load', function() {
alert('hello');
});
However, the same code does not seem to run in MediaWiki 1.18.0 in Internet
Explorer 8: no alert box is displayed. (It still works in Firefox though.)
Anybody know why?
I have confirmed, using IE Developer Tools, that window.addHandler is defined
in IE after the page loads, by typing "addHandler.toString()" in the console:
>>addHandler.toString()
"function(element,attach,handler){if(element.addEventListener){element.addEventListener(attach,handler,false);}else
if(element.attachEvent){element.attachEvent('on'+attach,handler);}}"
Thanks,
DanB
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l