Velocity API: WLEvent.trigger()

Version 1

    Return To Index

    WLEvent.trigger()

    Overview

    Trigger an event starting at the top of the scope stack which triggers each event until an event handler returns false.

    Format

     

    var resultObject = WLEvent.trigger(eventName, eventObject);
    ParameterDescriptionTypeRequiredNotes
    eventNameThe name of the event.StringRequired
    eventObjectThe object passed to the event containing event properties, and can be used to return results for an event.ObjectRequiredEach event can have its own set of properties that are passed in and returned for that event.
    resultObjectThe event object possibly modified by the event handlers.ObjectReturn

     

    Example

    /* Manunally trigger a key event as if a key was pressed. 
    * Send the enter key code.
    */
      
    WLEvent.trigger("Key", {keyCode:"000D"});