<?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%3ARestrictedEnvironment</id>
	<title>WoW:RestrictedEnvironment - 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%3ARestrictedEnvironment"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:RestrictedEnvironment&amp;action=history"/>
	<updated>2026-05-22T01:17:56Z</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:RestrictedEnvironment&amp;diff=6075&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page RestrictedEnvironment to WoW:RestrictedEnvironment without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:RestrictedEnvironment&amp;diff=6075&amp;oldid=prev"/>
		<updated>2023-08-15T04:48:54Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:RestrictedEnvironment&quot; title=&quot;WoW:RestrictedEnvironment&quot;&gt;RestrictedEnvironment&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:RestrictedEnvironment&quot; title=&quot;WoW:RestrictedEnvironment&quot;&gt;RestrictedEnvironment&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:RestrictedEnvironment&amp;diff=6073&amp;oldid=prev</id>
		<title>Bear: /* Control methods */</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:RestrictedEnvironment&amp;diff=6073&amp;oldid=prev"/>
		<updated>2020-05-18T00:20:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Control methods&lt;/span&gt;&lt;/span&gt;&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 00:20, 18 May 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l215&quot;&gt;Line 215:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 215:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Control methods ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Control methods ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Additional methods are available as part of the control table; allowing functionality somewhat resembling proper functions within the protected environment.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Additional methods are available as part of the control table; allowing functionality somewhat resembling proper functions within the protected environment.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;CallMethod(&amp;quot;methodName&amp;quot;, ...) : insecurely calls methodName method of the restricted environment&amp;#039;s owner.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;CallMethod(&amp;quot;methodName&amp;quot;, ...) : insecurely calls methodName method of the restricted environment&amp;#039;s owner.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;Run(&amp;quot;body&amp;quot;, ...) : executes Lua code in body with the provided arguments; self is the handle of the environment&amp;#039;s owner.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;Run(&amp;quot;body&amp;quot;, ...) : executes Lua code in body with the provided arguments; self is the handle of the environment&amp;#039;s owner.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l220&quot;&gt;Line 220:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 221:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;RunAttribute(&amp;quot;snippetAttr&amp;quot;, ...) : executes the method contained in the snippetAttr attribute of the restricted environment owner with self, ... as arguments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;RunAttribute(&amp;quot;snippetAttr&amp;quot;, ...) : executes the method contained in the snippetAttr attribute of the restricted environment owner with self, ... as arguments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;ChildUpdate(&amp;quot;snippetid&amp;quot;, message) : executes the contents of &amp;quot;_childupdate-&amp;#039;&amp;#039;snippetid&amp;#039;&amp;#039;&amp;quot; (or, if that attribute is nil/false, &amp;quot;_childupdate&amp;quot;), on all protected children (and children of children) of the restricted environment owner with (self, scriptid, message) arguments.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; control&amp;amp;#58;ChildUpdate(&amp;quot;snippetid&amp;quot;, message) : executes the contents of &amp;quot;_childupdate-&amp;#039;&amp;#039;snippetid&amp;#039;&amp;#039;&amp;quot; (or, if that attribute is nil/false, &amp;quot;_childupdate&amp;quot;), on all protected children (and children of children) of the restricted environment owner with (self, scriptid, message) arguments.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{API Trail Secure}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{API Trail Secure}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bear</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:RestrictedEnvironment&amp;diff=6074&amp;oldid=prev</id>
		<title>WoWWiki&gt;Starlightblunder: Created page with &#039;{{uitech}} &#039;&#039;&#039;Restricted environment&#039;&#039;&#039; refers to the environment in which restricted addon code (SecureHandler snippets) is executed. A limited subset of the ...&#039;</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:RestrictedEnvironment&amp;diff=6074&amp;oldid=prev"/>
		<updated>2009-06-03T22:40:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;{{uitech}} &amp;#039;&amp;#039;&amp;#039;Restricted environment&amp;#039;&amp;#039;&amp;#039; refers to the environment in which restricted addon code (&lt;a href=&quot;/wiki/WoW:SecureHandlers&quot; title=&quot;WoW:SecureHandlers&quot;&gt;SecureHandler&lt;/a&gt; snippets) is executed. A limited subset of the ...&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;Restricted environment&amp;#039;&amp;#039;&amp;#039; refers to the environment in which restricted addon code ([[SecureHandlers|SecureHandler]] snippets) is executed. A limited subset of the WoW API is available within the environment.&lt;br /&gt;
&lt;br /&gt;
== Available API ==&lt;br /&gt;
: {{api|SecureCmdOptionParse}}(&amp;quot;conditionalString&amp;quot;) : parses a macro conditional.&lt;br /&gt;
: {{api|GetShapeshiftForm}}() : returns current shape shift form.&lt;br /&gt;
: {{api|IsStealthed}}() : returns 1 if the player is stealthed&lt;br /&gt;
: {{api|UnitExists}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit exists.&lt;br /&gt;
: {{api|UnitIsDead}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit is dead.&lt;br /&gt;
: {{api|UnitIsGhost}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit is a ghost.&lt;br /&gt;
: {{api|UnitPlayerOrPetInParty}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit is a player or a pet in your party.&lt;br /&gt;
: {{api|UnitPlayerOrPetInRaid}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit is a player or a pet in your raid.&lt;br /&gt;
: {{api|IsRightAltKeyDown}}(), {{api|IsLeftAltKeyDown}}(), {{api|IsAltKeyDown}}() : return 1 if the relevant key is held down.&lt;br /&gt;
: {{api|IsRightControlKeyDown}}(), {{api|IsLeftControlKeyDown}}(), {{api|IsControlKeyDown}}() : return 1 if the relevant key is held down.&lt;br /&gt;
: {{api|IsRightShiftKeyDown}}(), {{api|IsLeftShiftKeyDown}}(), {{api|IsShiftKeyDown}}() : return 1 if the relevant key is held down.&lt;br /&gt;
: {{api|IsModifierKeyDown}}() : returns 1 if any alt, control or shift key is held down.&lt;br /&gt;
: {{api|IsModifiedClick}}(&amp;quot;modifierType&amp;quot;) : returns 1 if the associated modifier is held down.&lt;br /&gt;
: {{api|GetMouseButtonClicked}}() : returns the mouse button responsible for the hardware click.&lt;br /&gt;
: {{api|GetActionBarPage}}() : returns the current action bar page.&lt;br /&gt;
: {{api|GetBonusBarOffset}}() : returns the current action bar &amp;quot;bonus&amp;quot; offset (stance-specific bars).&lt;br /&gt;
: {{api|IsMounted}}() : returns 1 if the player is mounted.&lt;br /&gt;
: {{api|IsSwimming}}() : returns 1 if the player is swimming.&lt;br /&gt;
: {{api|IsFlying}}() : returns 1 if the player is flying.&lt;br /&gt;
: {{api|IsFlyableArea}}() : returns 1 if the player is in a flyable area (Northrend, Outland).&lt;br /&gt;
: {{api|IsIndoors}}() : returns 1 if the player is indoors.&lt;br /&gt;
: {{api|IsOutdoors}}() : returns 1 if the player is outdoors.&lt;br /&gt;
: {{api|GetBindingKey}}(&amp;quot;key&amp;quot;) : returns the action bound to a key.&lt;br /&gt;
: {{api|HasAction}}(slot) : returns 1 if an action is placed in the specified action bar slot.&lt;br /&gt;
: {{api|IsHarmfulSpell}}(slot[, bookType] or &amp;quot;spellName&amp;quot;) : returns 1 if the spell can be cast on hostile targets.&lt;br /&gt;
: {{api|IsHarmfulItem}}(slot[, bookType] or &amp;quot;spellName&amp;quot;) : returns 1 if the item can be used on hostile targets.&lt;br /&gt;
: {{api|IsHelpfulSpell}}(slot[, bookType] or &amp;quot;spellName&amp;quot;) : returns 1 if the spell can be cast on friendly targets.&lt;br /&gt;
: {{api|IsHelpfulItem}}(slot[, bookType] or &amp;quot;spellName&amp;quot;) : returns 1 if the item can be used on friendly targets.&lt;br /&gt;
: {{api|PlayerCanAttack}}(&amp;quot;unit&amp;quot;) : returns 1 if the player can attack the specified unit.&lt;br /&gt;
: {{api|PlayerCanAssist}}(&amp;quot;unit&amp;quot;) : returns 1 if the player can assist the specified unit.&lt;br /&gt;
: {{api|PlayerIsChanneling}}() : returns 1 if the player is channeling a spell.&lt;br /&gt;
: {{api|PlayerPetSummary}}() : returns pet creature family and pet name.&lt;br /&gt;
: {{api|PlayerInCombat}}() : returns 1 if the player or his pet is in combat.&lt;br /&gt;
: {{api|PlayerInGroup}}() : returns &amp;quot;party&amp;quot; or &amp;quot;raid&amp;quot; if the player is in one of those group types.&lt;br /&gt;
: {{api|UnitHasVehicleUI}}(&amp;quot;unit&amp;quot;) : returns 1 if the unit is in a vehicle that provides special UI.&lt;br /&gt;
: {{api|RegisterStateDriver}}(frame, state, conditional) : registers a [[SecureStateDriver]] for a specific frame.&lt;br /&gt;
: {{api|GetActionInfo}}(slot) : returns limited information about an action in a specific action slot.&lt;br /&gt;
&lt;br /&gt;
=== Restricted tables ===&lt;br /&gt;
Only &amp;#039;&amp;#039;restricted&amp;#039;&amp;#039; tables are accessible within the restricted environment -- essentially, the real table instances are kept local to prevent unrestricted access to variables within the restricted environment.  Most table functions within the restricted environment have been replaced by restricted table-aware versions, with the exception of the {{api|gsub}} function (use the restricted table-aware {{api|rtgsub}} instead of table lookup functionality is desired).&lt;br /&gt;
&lt;br /&gt;
The following table-related functions are usable inside the restricted environment:&lt;br /&gt;
{| class=&amp;quot;darktable&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;7&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;padding: 0.3em; background: #282828&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Restricted Table Library&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.next &lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.pairs &lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.ipairs &lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.unpack &lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.newtable &lt;br /&gt;
| width=&amp;quot;14%&amp;quot; | rtable.maxn &lt;br /&gt;
| width=&amp;quot;16%&amp;quot; | rtable.insert &lt;br /&gt;
|-&lt;br /&gt;
| rtable.remove || rtable.sort || rtable.concat || rtable.wipe || rtable.type || rtable.rtgsub || &amp;amp;nbsp;&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;7&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;padding: 0.3em; background: #282828&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Table Library&amp;#039;&amp;#039;&amp;#039; (restricted-table aware)&lt;br /&gt;
|-&lt;br /&gt;
| table.maxn || table.insert || table.remove || table.sort || table.concat || table.wipe || table.new&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;7&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;padding: 0.3em; background: #282828&amp;quot; | &amp;#039;&amp;#039;&amp;#039;Global API&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| newtable || pairs || ipairs || next || unpack || wipe || tinsert&lt;br /&gt;
|- &lt;br /&gt;
| tremove || type || rtgsub&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that as the restricted environment doesn&amp;#039;t contain proper function references, table.sort&amp;#039;s second argument (comparison function) may not be used from within the restricted environment.&lt;br /&gt;
&lt;br /&gt;
=== Other functions ===&lt;br /&gt;
The math and string standard library tables are provided in their entirety. The following table lists additional global functions that are also available in the restricted environment&lt;br /&gt;
{| class=&amp;quot;darktable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | select &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | tonumber &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | tostring &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | print &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | format &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | gmatch &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | gsub &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | strbyte &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | strchar &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | strconcat &lt;br /&gt;
| width=&amp;quot;9%&amp;quot; | strfind&lt;br /&gt;
|-&lt;br /&gt;
| strjoin || strlen || strlower || strmatch || strrep || strrev || strsplit || strsub || strtrim || strupper || abs&lt;br /&gt;
|-&lt;br /&gt;
| acos || asin || atan || atan2 || ceil || cos || deg || exp || floor || frexp || ldexp&lt;br /&gt;
|-&lt;br /&gt;
| log || log10 || max || min || mod || rad || random || sin || tan || &amp;amp;nbsp;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Frame handle methods ==&lt;br /&gt;
Real frame userdata values may not exists within the restricted environment; instead, it the restricted environment may contain frame references (introduced via the :SetFrameRef(&amp;quot;name&amp;quot;, frame) method). A limited subset of the widget API can be invoked upon those references; only methods marked with a star may be called on references to non-protected frames.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;darktable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! * &lt;br /&gt;
! style=&amp;quot;width: 12em&amp;quot;| Method !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; style=&amp;quot;background: #282828; font-weight: bold; padding: 0.3em&amp;quot; align=&amp;quot;center&amp;quot; | Accessor methods&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | * || handle:GetName() || Returns frame name.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | * || handle:GetObjectType() || Returns widget type.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | * || handle:IsObjectType(&amp;quot;widgetType&amp;quot;) || Returns 1 if the frame is of the specified widget type.&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | * || handle:IsProtected() || Returns 1 if the frame is protected.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetID() || Returns the ID value associated with the frame.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:IsShown() || Returns 1 if the frame is shown (even if its ancestors are not).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:IsVisible() || Returns 1 if the frame is visible (i.e. it and all its ancestors are shown).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetWidth() || Returns frame width.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetHeight() || Returns frame height.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetRect() || Returns left, bottom, width, height specification of the frame&amp;#039;s rectangle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetScale() || Returns frame scale.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetEffectiveScale() || Returns effective frame scale (its own scale multiplied with that of all of its ancestors).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetFrameLevel() || Returns frame level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetAttribute(&amp;quot;name&amp;quot;) || Returns the value of an attribute; name must not begin with an underscore.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetFrameRef(&amp;quot;name&amp;quot;) || Retrieve a restricted handle to a frame set by SetFrameRef().&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; style=&amp;quot;text-align: left&amp;quot; | handle:GetEffectiveAttribute(&amp;quot;name&amp;quot;, &amp;quot;button&amp;quot;, &amp;quot;prefix&amp;quot;, &amp;quot;suffix&amp;quot;) || Returns the effective value of a modified attribute. Attribute name must not begin with an underscore.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetChildren() || Returns restricted references to the frame&amp;#039;s children in a list(?).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetChildList(tbl) || Returns restricted references to the frame&amp;#039;s children in a table(?).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetParent() || Returns a restricted reference to the frame&amp;#039;s parent.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetMousePosition() || Returns mouse position relative to the frame, where (0,0) is the bottom left corner.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot;| handle:IsUnderMouse(recursive) || Returns 1 if the frame, or, if recursive is true, any of the frame&amp;#039;s children (and their children) are under the mouse.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetNumPoints() || Returns the number of anchoring points used by the frame.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:GetPoint(i) || Returns information about an anchoring point.&lt;br /&gt;
|-&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; style=&amp;quot;background: #282828; font-weight: bold; padding: 0.3em&amp;quot; align=&amp;quot;center&amp;quot; | Setter methods&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Show(skipAttr) || Shows a frame, and, unless skipAttr is true, set the &amp;quot;statehidden&amp;quot; attribute to nil.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Hide(skipAttr) || Hides a frame, and, unless skipAttr is true, set the &amp;quot;statehidden&amp;quot; attribute to true.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetID(id) || Sets the ID value associated with the frame&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetWidth(width) || Sets frame width.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetHeight(height) || Sets frame height.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetScale(scale) || Sets frame scale&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetAlpha(alpha) || Sets frame alpha&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:ClearAllPoints() || Clears all anchoring points&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetPoint(point, relframe, relpoint, ofsx, ofsy) || Sets an anchoring point.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetAllPoints([relframe]) || Sets points to fill relframe, or the frame&amp;#039;s parent if relframe is not specified.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetAttribute(&amp;quot;name&amp;quot;, value) || Sets an attribute on the frame. Name must not begin with an underscore.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:ClearBindings() || Clears all override bindings the frame is registered as an owner of.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:ClearBinding(key) || Clears a specific override binding this frame is the registered owner of.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot; style=&amp;quot;text-align: left&amp;quot; | handle:SetBindingClick(priority, key, name, button) || Creates an override click binding to click button specified by name (button name or reference), when key is pressed. The handle acts as the override binding&amp;#039;s owner&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| style=&amp;quot;text-align: left&amp;quot;| handle:SetBindingSpell(priority, key, spell) || Creates an override spell binding; the handle specifies the binding&amp;#039;s owner.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| style=&amp;quot;text-align: left&amp;quot;| handle:SetBindingMacro(priority, key, macro) || Creates an override macro binding; the handle specifies the binding&amp;#039;s owner.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| style=&amp;quot;text-align: left&amp;quot;| handle:SetBindingItem(priority, key, item) || Creates an override item binding; the handle specifies the binding&amp;#039;s owner.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Raise() || Makes frame top-most.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Lower() || Lowers the frame&amp;#039;s frame level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetFrameLevel(level) || Alters frame level.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:SetParent(parent) || Changes frame&amp;#039;s parent.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:RegisterAutoHide(duration) || Registers the frame to be hidden after the mouse leaves the frame for duration seconds.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:UnregisterAutoHide() || Unregisters the frame from automatic hiding.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; &lt;br /&gt;
| valign=&amp;quot;top&amp;quot;| handle:AddToAutoHide(childFrame) || Adds a child frame to this frame&amp;#039;s automatic hiding. The duration now applies to the mouse being out of both the frame and the childFrame.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Disable() || Disables a button, disabling click handling.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;nbsp; || handle:Enable() || Enables a button, enabling click handling.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Control methods ==&lt;br /&gt;
Additional methods are available as part of the control table; allowing functionality somewhat resembling proper functions within the protected environment.&lt;br /&gt;
; control&amp;amp;#58;CallMethod(&amp;quot;methodName&amp;quot;, ...) : insecurely calls methodName method of the restricted environment&amp;#039;s owner.&lt;br /&gt;
; control&amp;amp;#58;Run(&amp;quot;body&amp;quot;, ...) : executes Lua code in body with the provided arguments; self is the handle of the environment&amp;#039;s owner.&lt;br /&gt;
; control&amp;amp;#58;RunFor(handle, &amp;quot;body&amp;quot;, ...) : executes Lua code in body with the provided arguments; self is the argument value.&lt;br /&gt;
; control&amp;amp;#58;RunAttribute(&amp;quot;snippetAttr&amp;quot;, ...) : executes the method contained in the snippetAttr attribute of the restricted environment owner with self, ... as arguments.&lt;br /&gt;
; control&amp;amp;#58;ChildUpdate(&amp;quot;snippetid&amp;quot;, message) : executes the contents of &amp;quot;_childupdate-&amp;#039;&amp;#039;snippetid&amp;#039;&amp;#039;&amp;quot; (or, if that attribute is nil/false, &amp;quot;_childupdate&amp;quot;), on all protected children (and children of children) of the restricted environment owner with (self, scriptid, message) arguments.&lt;br /&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>