On Sat, Sep 28, 2013 at 3:23 PM, Amelia Ireland <[email protected]>wrote:

> I want to rewrite a couple of extensions to prevent them from loading
> resources unless the extension is active on a page. Is there some
> documentation on this somewhere, or an extension that does this whose code
> I examine?
>

This is probably what you're looking for:

https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Client-side_.28dynamically.29

There's a JavaScript function mw.loader.using() that loads modules before
calling the passed closure.

*-- *
*Tyler Romeo*
Stevens Institute of Technology, Class of 2016
Major in Computer Science
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to