API ScriptObject HasScript

Returns whether the widget supports a script type. hasScript = frame:HasScript(scriptType)

Arguments

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

Returns

 * hasScript : - 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