https://bugzilla.wikimedia.org/show_bug.cgi?id=33711
--- Comment #14 from Krinkle <[email protected]> 2012-01-20 11:44:30 UTC --- document-ready is a jQuery event (queue). Both your handler and the mw.util.init are added to that queue. Depending on in which order jQuery executes them, it will mean that for your script it's undefined or not. I remember a bug about this a few months back and we fixed (it was a bug about the unit test being unable to test the initializer becuase it initilized upon loading the script). As a good practice its recommended to separate the definitions of methods and actually executing code, and so we (I) did. As a result the mediawiki.page.ready module was added, which would actually initilize stuff (i.e. one should be able to load jquery.checkboxShiftClick without having it do something by default that can't be undone). However this doesn't change the fact that document-ready is still an event queue of which the order is practically uncontrollable. Wrapping the mw.loader.using call inside document-ready instead of the other way around doens't sound like something that should work or is supported so I don't recommend relying on that. It actually seems even counter-intuitive as it would add it to the queue before loading mw.util which would enqueue itself after yours. Anyway I remember a fix for this, but I can't think of what it was. I'll take a fresh look at this tonight. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
