Velocity API: WLEvent.hasEvent()

Version 2

    Return To Index

    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);
    ParameterDescriptionTypeRequiredNotes
    eventNameThe event name.StringRequired
    existsThe return value. True if an event exists.BooleanReturn

     

    Example

    /* Check to see if an event handler is in scope for the template T1 
    */
      
    var exists = WLEvent.hasEvent("@T1");