Page MenuHomePhabricator

Implement mw.loader.wait() and thus support multiple mw.loader.go()'s
Closed, InvalidPublic

Description

In a laer version of ResourceLoader we should support registering modules on the client side (ie. which scripts, styles, dependancies, messages etc.) however aside from that being able to queue things in general will be helpful.

All modules loaded by default are queued once and then loaded at once with mw.loader.go().

In order to allow wikis, users and gadget makers to use multiple scripts with one http request as well a mw.loader.wait() needs to be implemented.

This way a script can have:

mw.loader.wait();
mw.loader.load(["jquery.colorUtil", "jquery.hoverIntent", "jquery.ui.autocomplete"]);
mw.loader.go();


Version: 1.18.x
Severity: enhancement

Details

Reference
bz27415

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:17 PM
bzimport set Reference to bz27415.

Loading multiple at once can be done by using an array in mw.loader.load(). this already combines them.

Also mw.loader.using() supports this behaviour.