hasEvent

checks whether the component has the specified event

boolean hasEvent(string name);

Parameters

namestringthe event name, case-insensitive

Returns

booleantrue, if at least one handler was attached to the specified event. Otherwise, false

Example

var is_exit = mydata.hasEvent('onBeforeSelect');

Details

The method checks whether some handler was attached to the object, and doesn't check whether that object has such event

See also
Back to top