From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Frame:GetAttribute
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Frame:SetAttribute
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png Frame:SetAttributeNoHandler
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png  Wowprogramming.png Frame:CanChangeAttribute
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png Frame:ExecuteAttribute
GitHub Octocat.png  Dragonflight-Icon-Inline.png  BTNTemp.png OnAttributeChanged

Sets an attribute on the frame.

Frame:SetAttribute(attributeName, value)
Frame:SetAttributeNoHandler(attributeName, value)


string - The name of the attribute (case-insensitive) to be modified.
any - The value to be stored.


  • 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, calling Frame:SetAttributeNoHandler() will not trigger this.

Patch changes

Shadowlands Patch 9.2.0 (2022-02-22): Added suppressScriptHandler parameter. Later removed in hotfix build 42488 on 25 Feb 2022, replaced by the addition of Frame:SetAttributeNoHandler().
Bc icon.gif Patch 2.0.1 (2006-12-05): Added.