Page MenuHomePhabricator

ResourceLoader should not create empty stylesheets for modules that don't have stylesheets
Closed, ResolvedPublic

Description

As the title says. With stuff like bug 31676, we definitely don't want to insert more junk then we have to.

For example:

https://www.mediawiki.org/w/load.php?modules=mediawiki.legacy.wikibits

mw.loader.implement('mediawiki.legacy.wikibits',function(){ .. },{"":""},{});

that third argument there should be an empty object.


Version: 1.17.x
Severity: normal

Details

Reference
bz38024

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:46 AM
bzimport set Reference to bz38024.

Change-Id: I436a6a1c64452fc60a58fd9a478a2ac2b1328211

  • Saves number of <style> tags inserted, which in turn is good for IE's stupid stylesheet limit (bug 31676).
  • Also saves a little bit of bandwidth by outputting {} instead of {"":""}.