WLEvent.hasEvent()

Overview

Checks to see if an event is currently available and would be passed to a handler function.

Added in version 1.2.103

See Also

WLEvent.on()

Format

var exists = WLEvent.hasEvent(eventName);

Parameter Description Type Required
eventName The event name. String Required
exists The return value. True if an event exists. Boolean Return

Example

Copy
/* Check to see if an event handler is in scope for the template T1
*/

var exists = WLEvent.hasEvent("Key");