(bug 31895) Fix bug in mediawiki.js with early domready handlers.
authorTimo Tijhof <ttijhof@wikimedia.org>
Sat, 23 Jun 2012 14:48:09 +0000 (16:48 +0200)
committerCatrope <roan.kattouw@gmail.com>
Wed, 4 Jul 2012 06:16:45 +0000 (23:16 -0700)
commita9aaa39fae4f2ef81fe12b3433e515a89e2b7bef
tree6752e7066187a45283d49c513045b0003c3533a5
parent17435154e16479342efdd7f10d910999ef208a0b
(bug 31895) Fix bug in mediawiki.js with early domready handlers.

Previously it used a local `ready` variable set to false, that is
set to true from a $.fn.ready callback. Sounds good, except that
we're not the only one in that callback list. And, more
importantly, not always the first one.

Thus if an earlier domready callback calls mw.loader, the value is
still false, and the wrong load method could be used (bug 31895).

Fixing by using $.isReady directly, which is set to true right
before the domready callback list is fired.

This is bug is impossible to hit within a MediaWiki environment
since mediawiki.js is the first script loaded from the startup
module and is blocking as well.

But browser-userscripts, greasemonkey and/or browse extensions can
sometimes get in an odd position in between or before.

Change-Id: I146c1d2245aae71c538ce84daee30b4ec490b874
RELEASE-NOTES-1.20
resources/mediawiki/mediawiki.js