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'][] = 'MyExtensionHooks::someExample';
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)
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox