Wowpedia
Advertisement
Wowpedia
240,483
pages

Returns whether the widget supports a script type.

hasScript = frame:HasScript(scriptType)

Arguments

scriptType 
string - Name of the script type, e.g. "OnShow".

Returns

hasScript 
boolean - Returns true if this script type is supported, false otherwise.

Example

OnShow is supported by Frame, but OnClick is not.

local f = CreateFrame("Frame")
print(f:HasScript("OnShow")) -- true
print(f:HasScript("OnClick")) -- false

External links

Advertisement