From: Krinkle Date: Sun, 24 Jul 2011 21:36:54 +0000 (+0000) Subject: Adding documentation for mw.loader.register X-Git-Tag: 1.31.0-rc.0~28648 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=9d0a65514091418fe8e99d8f696317d37dc9c1bb;p=lhc%2Fweb%2Fwiklou.git Adding documentation for mw.loader.register --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 4bb14a3f5b..e9947bcf33 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -838,7 +838,13 @@ window.mw = window.mediaWiki = new ( function( $ ) { /** * Registers a module, letting the system know about it and its - * dependencies. loader.js files contain calls to this function. + * properties. Startup modules contain calls to this function. + * + * @param module {String}: Module name + * @param version {Number}: Module version number as a timestamp (falls backs to 0) + * @param dependencies {String|Array|Function}: One string or array of strings of module + * names on which this module depends, or a function that returns that array. + * @param group {String}: Group which the module is in (optional, defaults to null) */ this.register = function( module, version, dependencies, group ) { // Allow multiple registration