<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3ASecureHandlerStateTemplate</id>
	<title>WoW:SecureHandlerStateTemplate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3ASecureHandlerStateTemplate"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerStateTemplate&amp;action=history"/>
	<updated>2026-05-22T13:28:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerStateTemplate&amp;diff=19221&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page SecureHandlerStateTemplate to WoW:SecureHandlerStateTemplate without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerStateTemplate&amp;diff=19221&amp;oldid=prev"/>
		<updated>2023-08-15T04:48:56Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:SecureHandlerStateTemplate&quot; title=&quot;WoW:SecureHandlerStateTemplate&quot;&gt;SecureHandlerStateTemplate&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:SecureHandlerStateTemplate&quot; title=&quot;WoW:SecureHandlerStateTemplate&quot;&gt;SecureHandlerStateTemplate&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:48, 15 August 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerStateTemplate&amp;diff=19220&amp;oldid=prev</id>
		<title>WoWWiki&gt;Starlightblunder: Created page with &#039;{{uitech}} &#039;&#039;&#039;SecureHandlerStateTemplate&#039;&#039;&#039; is one of the SecureHandler templates introduced in Patch 3.0. Those templates exist in order to allow addon code to execute withi...&#039;</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerStateTemplate&amp;diff=19220&amp;oldid=prev"/>
		<updated>2009-06-03T11:32:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{uitech}} &amp;#039;&amp;#039;&amp;#039;SecureHandlerStateTemplate&amp;#039;&amp;#039;&amp;#039; is one of the SecureHandler templates introduced in &lt;a href=&quot;/mw1/index.php?title=WoW:Patch_3.0&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WoW:Patch 3.0 (page does not exist)&quot;&gt;Patch 3.0&lt;/a&gt;. Those templates exist in order to allow addon code to execute withi...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{uitech}}&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;SecureHandlerStateTemplate&amp;#039;&amp;#039;&amp;#039; is one of the SecureHandler templates introduced in [[Patch 3.0]]. Those templates exist in order to allow addon code to execute within a restricted environment, where it may perform protected actions but has access only to a limited subset of the API. SecureHandlerStateTemplate executes snippets whenever any attribute prefixed with &amp;quot;state-&amp;quot; changes value, making it ideal for use in combination with [[SecureStateDriver]].&lt;br /&gt;
&lt;br /&gt;
== Snippets ==&lt;br /&gt;
The handler executes the following snippets in a restricted environment:&lt;br /&gt;
; _onstate-&amp;#039;&amp;#039;identifier&amp;#039;&amp;#039; (self, stateid, newstate) : The snippet is executed when the &amp;quot;state-&amp;#039;&amp;#039;identifier&amp;#039;&amp;#039;&amp;quot; attribute changes value; &amp;#039;&amp;#039;identifier&amp;#039;&amp;#039; may be any arbitrary string of one or more characters.&lt;br /&gt;
:; self : Secure frame handle to the frame.&lt;br /&gt;
:; stateid : String - &amp;#039;&amp;#039;identifier&amp;#039;&amp;#039; of the changed state.&lt;br /&gt;
:; newstate : Mixed - new value of the &amp;quot;state-&amp;#039;&amp;#039;identifier&amp;#039;&amp;#039;&amp;quot; attribute. Note that if the value is not a string, boolean or a number, it&amp;#039;ll be replaced with nil -- this a limitation enforced by the restricted environment.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The frame defined in XML below will be shown only if you have a hostile target. Note that the frame also behaves properly in combat, even though it is protected.&lt;br /&gt;
 &amp;lt;Frame name=&amp;quot;MyStateFrame&amp;quot; inherits=&amp;quot;SecureHandlerStateTemplate&amp;quot; parent=&amp;quot;UIParent&amp;quot; protected=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;Attributes&amp;gt;&lt;br /&gt;
    &amp;lt;Attribute name=&amp;quot;_onstate-foo&amp;quot; value=&amp;quot;if newstate == &amp;#039;show&amp;#039; then self:Show(); else self:Hide(); end&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/Attributes&amp;gt;&lt;br /&gt;
  &amp;lt;Scripts&amp;gt;&lt;br /&gt;
   &amp;lt;OnLoad&amp;gt;&lt;br /&gt;
    SecureHandler_OnLoad(self); -- Our OnLoad handler overwrites this one, so execute it now.&lt;br /&gt;
    RegisterStateDriver(self, &amp;quot;foo&amp;quot;, &amp;quot;[target=target,exists,harm] show; hide&amp;quot;);&lt;br /&gt;
   &amp;lt;/OnLoad&amp;gt;&lt;br /&gt;
  &amp;lt;/Scripts&amp;gt;&lt;br /&gt;
  &amp;lt;Size x=&amp;quot;64&amp;quot; y=&amp;quot;64&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;Anchors&amp;gt;&amp;lt;Anchor point=&amp;quot;CENTER&amp;quot;/&amp;gt;&amp;lt;/Anchors&amp;gt;&lt;br /&gt;
  &amp;lt;Layers&amp;gt;&amp;lt;Layer level=&amp;quot;OVERLAY&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;Texture name=&amp;quot;$parentTex&amp;quot; file=&amp;quot;Icons\Temp&amp;quot; setAllPoints=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/Layer&amp;gt;&amp;lt;/Layers&amp;gt;&lt;br /&gt;
 &amp;lt;/Frame&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{API Trail Secure}}&lt;/div&gt;</summary>
		<author><name>WoWWiki&gt;Starlightblunder</name></author>
	</entry>
</feed>