![]() |
Wowpedia is no longer updated, go away. |
Returns true if the region supports the given script type.
hasScript = ScriptRegion:HasScript(scriptName)
Arguments[]
- scriptName
- string - Name of the script type, for example "OnShow".
Returns[]
- hasScript
- boolean
Example[]
The OnShow script type is supported by Frame, OnClick is not.
local f = CreateFrame("Frame")
print(f:HasScript("OnShow")) -- true
print(f:HasScript("OnClick")) -- false