Widget API ← Frame < GetAttribute

Returns the value of a specific attribute (or an attribute matching the prefix/suffix arguments).

value = frame:GetAttribute(name);
value = frame:GetAttribute(prefix, name, suffix);


String - modifier prefix string: a concatenation of alt-, ctrl-, and shift-, whichever apply, in that order.
Attribute name. If passed as the only argument, this may be a fully qualified value; otherwise, it is the unmodified name of the attribute being retrieved.
String - button suffix string: either a numeric string or a dash followed by an arbitrary button name.

Returns Edit

Mixed - the value of the matching attribute; nil if no attribute matched the arguments.

Matching order Edit

When invoked with three arguments, this function attempts to return attributes in the following order (returning the first attribute that exists):

  1. prefix .. name .. suffix
  2. "*" .. name .. suffix
  3. prefix .. name .. "*"
  4. "*" .. name .. "*"
  5. name

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.