On Wed, Jan 25, 2012 at 7:35 AM, Rob Lanphier <robla(a)wikimedia.org> wrote:
A couple of relevant bugs:
Bug 33711 - mw.util.$content is undefined in MediaWiki:Common.js
Bug 33746 - Resource Loader should pre-depend on mw.util
Roan should be weighing in on these soon. My understanding is that he
plans to add the necessary dependency to make this work.
These were fixed a little while ago by loading mw.util and its
dependencies early. This means that any JS that uses mw.util but
doesn't explicitly declare this dependency will continue to work,
because mw.util will be one of the first things to be loaded (before
any on-wiki JS) and will always be loaded regardless of whether any
module indicates they need this or not. However, ideally people
shouldn't rely on this behavior (it probably won't be this way
forever, as we'll try to get rid of these early-loading privileges
where we can), and should always list all dependencies a gadget or
user script uses.
The following modules are loaded early and are always present:
mediawiki.legacy.ajax (pending merge of r111034 into 1.19)
mediawiki.util (listed separately, but would be loaded anyway because
page.startup depends on it)
Additionally, the following modules are also loaded early and always
because one of the three modules above depends on them:
jquery.client (dependency of mw.page.startup and mw.util)
jquery.cookie (dependency of mw.util)
jquery.messageBox (dependency of mw.util)
jquery.mwExtension (dependency of mw.util)
You should rely even less on this second set of modules being
magically present, because these dependencies might be factored out
and disappear unannounced.
I believe this should address everyone's concerns about JS breakage in
1.19 (I've put in workarounds for every kind of breakage I've seen or
could think of), but if there are any outstanding issues or concerns
feel free to talk to me on-list or off-list.