XML/Scripts

From Warcraft Wiki
< XML
Jump to navigation Jump to search

<Scripts> (child of <Frame>, <AnimationGroup> or <Animation>) contains widget script handlers such as <OnLoad> or <OnUpdate>.

<Scripts>
	<OnLoad function="" method="" inherit="" intrisictOrder="" autoEnableInput="" />	
	<OnUpdate>
		-- Lua code
	<OnUpdate>
	<!-- See widget script handlers for the full list -->
</Scripts>

Child elements

Each widget script may enclose Lua code between the tags.

function (xs:string?Optional. Could be nil.) - Name of a function instead of Lua code between the XML tags.
method (xs:string?Optional. Could be nil.) - Name of a widget method instead of Lua code between the XML tags.
inherit (xs:string?Optional. Could be nil.) - Hooks (prepend, append) other scripts inherited through an XML virtual template.
intrinsicOrder (xs:string?Optional. Could be nil.) - Hooks (precall, postcall) other scripts when copied as an intrinsic frame.
autoEnableInput (xs:boolean?Optional. Could be nil.)