Programmer's Guide > Interfaces > W3C EventTarget interface > dispatchEvent method
  
dispatchEvent method
This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.
dispatchEvent(evt )
Parameters
Eventevt
Specifies the event type, behavior, and contextual information to be used in processing the event.
Returns
boolean. The return value of dispatchEvent indicates whether any of the listeners which handled the event called preventDefault. If preventDefault was called the value is false, else the value is true.
Throws
EventException
UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as null or an empty string will also trigger this exception.