resourceloader: Document 'target' query param in StartupModule
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 22 Mar 2018 03:34:40 +0000 (20:34 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 22 Mar 2018 03:34:40 +0000 (20:34 -0700)
Bug: T127268
Change-Id: I38150b2d82420f5058137d611c63e07cbd9c2f96

includes/resourceloader/ResourceLoaderStartUpModule.php

index e5fe928..ae9520d 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Module for ResourceLoader initialization.
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * @author Roan Kattouw
  */
 
+/**
+ * Module for ResourceLoader initialization.
+ *
+ * See also <https://www.mediawiki.org/wiki/ResourceLoader/Features#Startup_Module>
+ *
+ * The startup module, as being called only from ResourceLoaderClientHtml, has
+ * the ability to vary based extra query parameters, in addition to those
+ * from ResourceLoaderContext:
+ *
+ * - target: Only register modules in the client allowed within this target.
+ *   Default: "desktop".
+ *   See also: OutputPage::setTarget(), ResourceLoaderModule::getTargets().
+ */
 class ResourceLoaderStartUpModule extends ResourceLoaderModule {
 
        // Cache for getConfigSettings() as it's called by multiple methods