Manual:Hooks/AjaxAddScript

From MediaWiki.org

Jump to: navigation, search
AjaxAddScript
Available from version 1.9.1
Called in output page just before the initialization

*Define function:
function fnMyHook( &$out ) { ... }

*Attach hook:
$wgHooks['AjaxAddScript'][] = 'fnMyHook';
Called from: OutputPage.php

*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:AjaxAddScript extensions.


[edit] Details

  • &$out: OutputPage object

[edit] Notes

  • This hook is only called when ajax is enabled ($wgUseAjax = true)