https://bugzilla.wikimedia.org/show_bug.cgi?id=50038
Web browser: ---
Bug ID: 50038
Summary: OutputPage: Don't output mw.loader.state "loading" and
mw.loader.state "ready" for the same module
Product: MediaWiki
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Skin and page rendering
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
It looks like we currently output both for some modules.
Current output on a wiki with user and site css/js enabled[1] but empty:
<script>if(window.mw){
mw.loader.state({"site":"loading","user":"loading","user.groups":"loading"});
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.page.watch.ajax","ext.vector.collapsibleNav","ext.visualEditor.viewPageTarget","skins.vector.js"],null,true);
}</script>
<script>if(window.mw){
mw.loader.state({"site":"ready"});
}</script>
<script>if(window.mw){
mw.loader.state({"user":"ready"});
}</script>
<script>if(window.mw){
mw.loader.state({"user.groups":"ready"});
}</script>
The first one with "loading" is always output. The last 3 with "ready" are
output by OutputPage::makeResourceLoaderLink if $module->isKnownEmpty is true.
We should probably optimise this to just output "ready" in the first place.
--
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