<?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%3ASecureHandlerAttributeTemplate</id>
	<title>WoW:SecureHandlerAttributeTemplate - 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%3ASecureHandlerAttributeTemplate"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerAttributeTemplate&amp;action=history"/>
	<updated>2026-05-22T12:28:45Z</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:SecureHandlerAttributeTemplate&amp;diff=19223&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page SecureHandlerAttributeTemplate to WoW:SecureHandlerAttributeTemplate without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerAttributeTemplate&amp;diff=19223&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:SecureHandlerAttributeTemplate&quot; title=&quot;WoW:SecureHandlerAttributeTemplate&quot;&gt;SecureHandlerAttributeTemplate&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:SecureHandlerAttributeTemplate&quot; title=&quot;WoW:SecureHandlerAttributeTemplate&quot;&gt;SecureHandlerAttributeTemplate&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;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&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;!-- diff cache key addonstu_asmw2:diff::1.12:old-19222:rev-19223 --&gt;
&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerAttributeTemplate&amp;diff=19222&amp;oldid=prev</id>
		<title>WoWWiki&gt;Starlightblunder: Created page with &#039;{{uitech}} &#039;&#039;&#039;SecureHandlerAttributeTemplate&#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 w...&#039;</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:SecureHandlerAttributeTemplate&amp;diff=19222&amp;oldid=prev"/>
		<updated>2009-06-03T11:39:39Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{uitech}} &amp;#039;&amp;#039;&amp;#039;SecureHandlerAttributeTemplate&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 w...&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;SecureHandlerAttributeTemplate&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. SecureHandlerAttributeTemplate executes snippets whenever an attribute on the frame (whose name does not begin with &amp;quot;_&amp;quot;) changes value.&lt;br /&gt;
&lt;br /&gt;
== Snippets ==&lt;br /&gt;
The handler executes the following snippets in a restricted environment:&lt;br /&gt;
; _onattributechanged (self, name, value) : The snippet is executed when the an attribute changes value; unless its name begins with an underscore.&lt;br /&gt;
:; self : Secure frame handle to the frame.&lt;br /&gt;
:; name : String - attribute name.&lt;br /&gt;
:; value : Mixed - new attribute value. 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;
Suppose we wanted to respond to :SetFrameRef() invocations on the frame by handling the frame in some fashion.&lt;br /&gt;
 local frame = CreateFrame(&amp;quot;FRAME&amp;quot;, &amp;quot;MyAttributeFrame&amp;quot;, UIParent, &amp;quot;SecureHandlerAttributeTemplate&amp;quot;);&lt;br /&gt;
 frame:SetAttribute(&amp;quot;_onattributechanged&amp;quot;, [=[&lt;br /&gt;
  if name:match(&amp;quot;frameref%-.+&amp;quot;) then&lt;br /&gt;
   -- value is nil, since the original type is userdata. &lt;br /&gt;
   -- We can fix that by asking for the frame ref:&lt;br /&gt;
   value = self:GetFrameRef(name:match(&amp;quot;frameref%-(.+)&amp;quot;));&lt;br /&gt;
   -- Now handle the name/value pair in some fashion...&lt;br /&gt;
   print(&amp;quot;SetFrameRef: &amp;quot;, name, value);&lt;br /&gt;
  end&lt;br /&gt;
 ]=]);&lt;br /&gt;
 frame:SetFrameRef(&amp;quot;ref&amp;quot;, frame);&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>