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);

Parameter Description Type Required Notes
eventName The name of the event. String Required
eventObject The object passed to the event containing event properties, and can be used to return results for an event. Object Required Each event can have its own set of properties that are passed in and returned for that event.
resultObject The event object possibly modified by the event handlers. Object Return

Example

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