r102524 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102523‎ | r102524 | r102525 >
Date:16:04, 9 November 2011
Author:hashar
Status:deferred
Tags:
Comment:
document ResourceLoaderRegisterModules hook
Modified paths:
  • /branches/JSTesting/docs/hooks.txt (modified) (history)

Diff [purge]

Index: branches/JSTesting/docs/hooks.txt
@@ -1526,6 +1526,16 @@
15271527 loader request or generating HTML output.
15281528 &$resourceLoader: ResourceLoader object
15291529
 1530+'ResourceLoaderTestModules': let you add new javascript testing modules. This is called after the addition of 'qunit' and MediaWiki testing ressources.
 1531+&testModules: array of javascript testing modules. 'qunit' is feed using tests/qunit/QUnitTestResources.php.
 1532+&RessourceLoader object
 1533+To add a new qunit module named 'myext.tests':
 1534+testModules['qunit']['myext.tests'] = array(
 1535+ 'script' => 'extension/myext/tests.js',
 1536+ 'dependencies' => <any module dependency you might have>
 1537+);
 1538+For qunit framework, the mediawiki.tests.qunit.testrunner dependency will be added to any module.
 1539+
15301540 'RevisionInsertComplete': called after a revision is inserted into the DB
15311541 &$revision: the Revision
15321542 $data: the data stored in old_text. The meaning depends on $flags: if external

Status & tagging log