Frame:SetAttribute
Jump to navigation
Jump to search
Frame:GetAttribute |
||
Frame:SetAttribute |
||
Frame:SetAttributeNoHandler |
||
Frame:CanChangeAttribute |
||
Frame:ExecuteAttribute |
||
OnAttributeChanged |
Sets an attribute on the frame.
Frame:SetAttribute(attributeName, value) Frame:SetAttributeNoHandler(attributeName, value)
Arguments
- attributeName
- string - The name of the attribute (case-insensitive) to be modified.
- value
- any - The value to be stored.
Details
- Attributes are typically used to launder values from insecure code to a protected or restricted environment, as described in Secure Execution and Tainting. They should not be confused with XML attributes.
- Calling
Frame:SetAttribute()
triggers the OnAttributeChanged script handler. Conversely, callingFrame:SetAttributeNoHandler()
will not trigger this.
Patch changes
- Patch 9.2.0 (2022-02-22): Added
suppressScriptHandler
parameter. Later removed in hotfix build 42488 on 25 Feb 2022, replaced by the addition ofFrame:SetAttributeNoHandler()
. - Patch 2.0.1 (2006-12-05): Added.