Description
Details
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/core | master | +4 -23 | Drop deprecated $wgPreloadJavaScriptMwUtil |
Related Objects
Event Timeline
There is nothing to avoid here, it's not actually being loaded on top
The position attribute only applies to when a modules is loaded by the page controller (e.g. addModules). When wgPreloadJavaScriptMwUtil is false (which it is for Wikimedia) mediawiki.util will not be added to the page. As such, it will not be in any position (not top, not bottom).
Of course, if a different module (which has position=top) is loaded that depends on "mediawiki.util", then it and its dependencies will be loaded from the top. But that will happen irregardless of its position attribute.
Rephrasing bug to focus just on $wgPreloadJavaScriptMwUtil.
Note that $wgIncludeLegacyJavaScript and $wgPreloadJavaScriptMwUtil have been officially marked deprecated as of 0ac4f99804 (to be released in MediaWiki 1.26).
I propose we remove them in MediaWiki 1.27 (expected to be released in May 2016; Wikimedia 1.27alpha to start in November/December 2015).
Change 277475 had a related patch set uploaded (by Jforrester):
[WIP] Drop deprecated $wgIncludeLegacyJavaScript and $wgPreloadJavaScriptMwUtil
I see this has been tagged for inclusion in Tech News. How would you phrase a simple explanation of this in a sentence or two?
Change 277738 had a related patch set uploaded (by Jforrester):
Drop deprecated $wgPreloadJavaScriptMwUtil
Does the removal of $wgPreloadJavaScriptMwUtil in a default configuration anything noticeable (other than internal code clean-up)? wikibits.js has a dependency on mw.util, so as long as wikibits.js is preloaded, mw.util will be preloaded, too, whether or not $wgPreloadJavaScriptMwUtil is true, false, or not existent.
Correct. However, note that $wgIncludeLegacyJavaScript is now false by default – T35836: Set $wgIncludeLegacyJavaScript = false by default.