On Thu, Dec 22, 2011 at 7:28 PM, Daniel Barrett <[email protected]> wrote:
> 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?
>
You probably need to do window.addHandler( .. ) instead?
Alternatively, use jQuery to bind events. If you just want to do
something upon document ready, use:
jQuery( document ).ready( function() { ... } ); or even jQuery(
function() { ... } );
Roan
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l