TheEventTargetinterface is implemented by allNodesin an implementation which supports the DOM Event Model. Therefore, this interface can be obtained by using binding-specific casting methods on an instance of theNodeinterface. The interface allows registration and removal ofEventListenerson anEventTargetand dispatch of events to thatEventTarget.

This method allows the registration of event listeners on the event target. If anEventListeneris added to anEventTargetwhile it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.

If multiple identicalEventListeners are registered on the sameEventTargetwith the same parameters the duplicate instances are discarded. They do not cause theEventListenerto be called twice and since they are discarded they do not need to be removed with theremoveEventListenermethod.

The event type for which the user is registering

Thelistenerparameter takes an interface implemented by the user which contains the methods to be called when the event occurs.

If true,useCaptureindicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registeredEventListenerbefore being dispatched to anyEventTargetsbeneath them in the tree. Events which are bubbling upward through the tree will not trigger anEventListenerdesignated to use capture.

This method allows the removal of event listeners from the event target. If anEventListeneris removed from anEventTargetwhile it is processing an event, it will not be triggered by the current actions.EventListeners can never be invoked after being removed.

CallingremoveEventListenerwith arguments which do not identify any currently registeredEventListeneron theEventTargethas no effect.

Specifies the event type of theEventListenerbeing removed.

TheEventListenerparameter indicates theEventListenerto be removed.

Specifies whether theEventListenerbeing removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

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 theEventTargeton whichdispatchEventis called.

Specifies the event type, behavior, and contextual information to be used in processing the event.

The return value ofdispatchEventindicates whether any of the listeners which handled the event calledpreventDefault. IfpreventDefaultwas called the value is false, else the value is true.

UNSPECIFIED_EVENT_TYPE_ERR: Raised if theEvent's type was not specified by initializing the event beforedispatchEventwas called. Specification of theEvent's type asnullor an empty string will also trigger this exception.

TheEventListenerinterface is the primary method for handling events. Users implement theEventListenerinterface and register their listener on anEventTargetusing theAddEventListenermethod. The users should also remove theirEventListenerfrom itsEventTargetafter they have completed using the listener.

When aNodeis copied using thecloneNodemethod theEventListeners attached to the sourceNodeare not attached to the copiedNode. If the user wishes the sameEventListeners to be added to the newly created copy the user must add them manually.

This method is called whenever an event occurs of the type for which theEventListenerinterface was registered.

TheEventcontains contextual information about the event. It also contains thestopPropagationandpreventDefaultmethods which are used in determining the event's flow and default action.

TheEventinterface is used to provide contextual information about an event to the handler processing the event. An object which implements theEventinterface is generally passed as the first parameter to an event handler. More specific context information is passed to event handlers by deriving additional interfaces fromEventwhich contain information directly relating to the type of event they accompany. These derived interfaces are also implemented by the object passed to the event listener.

An integer indicating which phase of event flow is being processed.

The current event phase is the capturing phase.

The event is currently being evaluated at the targetEventTarget.

The current event phase is the bubbling phase.

The name of the event (case-insensitive). The name must be anXML name.

Used to indicate theEventTargetto which the event was originally dispatched.

Used to indicate theEventTargetwhoseEventListenersare currently being processed. This is particularly useful during capturing and bubbling.

Used to indicate which phase of event flow is currently being evaluated.

Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.

Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false.

Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value oftimeStampmay be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

ThestopPropagationmethod is used prevent further propagation of an event during event flow. If this method is called by anyEventListenerthe event will cease propagating through the tree. The event will complete dispatch to all listeners on the currentEventTargetbefore event flow stops. This method may be used during any stage of event flow.

If an event is cancelable, thepreventDefaultmethod is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. If, during any stage of event flow, thepreventDefaultmethod is called the event is canceled. Any default action associated with the event will not occur. Calling this method for a non-cancelable event has no effect. OncepreventDefaulthas been called it will remain in effect throughout the remainder of the event's propagation. This method may be used during any stage of event flow.

TheinitEventmethod is used to initialize the value of anEventcreated through theDocumentEventinterface. This method may only be called before theEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass ofEventinterface only the values specified in theinitEventmethod are modified, all other attributes are left unchanged.

Specifies the event type. This type may be any event type currently defined in this specification or a new event type.. The string must be anXML name.

Any new event type must not begin with any upper, lower, or mixed case version of the string "DOM". This prefix is reserved for future DOM event sets. It is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.

Specifies whether or not the event can bubble.

Specifies whether or not the event's default action can be prevented.

Event operations may throw anEventExceptionas specified in their method descriptions.

unsigned short

An integer indicating the type of error generated.

If theEvent's type was not specified by initializing the event before the method was called. Specification of the Event's type asnullor an empty string will also trigger this exception.

TheDocumentEventinterface provides a mechanism by which the user can create an Event of a type supported by the implementation. It is expected that theDocumentEventinterface will be implemented on the same object which implements theDocumentinterface in an implementation which supports the Event model.

TheeventTypeparameter specifies the type ofEventinterface to be created. If theEventinterface specified is supported by the implementation this method will return a newEventof the interface type requested. If theEventis to be dispatched via thedispatchEventmethod the appropriate event init method must be called after creation in order to initialize theEvent's values. As an example, a user wishing to synthesize some kind ofUIEventwould callcreateEventwith the parameter "UIEvents". TheinitUIEventmethod could then be called on the newly createdUIEventto set the specific type of UIEvent to be dispatched and set its context information.

ThecreateEventmethod is used in creatingEvents when it is either inconvenient or unnecessary for the user to create anEventthemselves. In cases where the implementation providedEventis insufficient, users may supply their ownEventimplementations for use with thedispatchEventmethod.

The newly createdEvent

NOT_SUPPORTED_ERR: Raised if the implementation does not support the type ofEventinterface requested

TheUIEventinterface provides specific contextual information associated with User Interface events.

Theviewattribute identifies theAbstractViewfrom which the event was generated.

Specifies some detail information about theEvent, depending on the type of event.

TheinitUIEventmethod is used to initialize the value of aUIEventcreated through theDocumentEventinterface. This method may only be called before theUIEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

Specifies the event type.

Specifies whether or not the event can bubble.

Specifies whether or not the event's default action can be prevented.

Specifies theEvent'sAbstractView.

Specifies theEvent's detail.

TheMouseEventinterface provides specific contextual information associated with Mouse events.

Thedetailattribute inherited fromUIEventindicates the number of times a mouse button has been pressed and released over the same screen location during a user action. The attribute value is 1 when the user begins this action and increments by 1 for each full sequence of pressing and releasing. If the user moves the mouse between the mousedown and mouseup the value will be set to 0, indicating that no click is occurring.

In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within its descendent elements.

The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.

The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.

The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.

The vertical coordinate at which the event occurred relative to the DOM implementation's client area.

Used to indicate whether the 'ctrl' key was depressed during the firing of the event.

Used to indicate whether the 'shift' key was depressed during the firing of the event.

Used to indicate whether the 'alt' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

Used to indicate whether the 'meta' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

During mouse events caused by the depression or release of a mouse button,buttonis used to indicate which mouse button changed state. The values forbuttonrange from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

Used to identify a secondaryEventTargetrelated to a UI event. Currently this attribute is used with the mouseover event to indicate theEventTargetwhich the pointing device exited and with the mouseout event to indicate theEventTargetwhich the pointing device entered.

TheinitMouseEventmethod is used to initialize the value of aMouseEventcreated through theDocumentEventinterface. This method may only be called before theMouseEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

Specifies the event type.

Specifies whether or not the event can bubble.

Specifies whether or not the event's default action can be prevented.

Specifies theEvent'sAbstractView.

Specifies theEvent's mouse click count.

Specifies theEvent's screen x coordinate

Specifies theEvent's screen y coordinate

Specifies theEvent's client x coordinate

Specifies theEvent's client y coordinate

Specifies whether or not control key was depressed during theEvent.

Specifies whether or not alt key was depressed during theEvent.

Specifies whether or not shift key was depressed during theEvent.

Specifies whether or not meta key was depressed during theEvent.

Specifies theEvent's mouse button.

Specifies theEvent's relatedEventTarget.

TheMutationEventinterface provides specific contextual information associated with Mutation events.

An integer indicating in which way theAttrwas changed.

TheAttrwas modified in place.

TheAttrwas just added.

TheAttrwas just removed.

relatedNodeis used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, therelatedNodeis the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, therelatedNodeis the changed node. In the case of the DOMAttrModified event it indicates theAttrnode which was modified, added, or removed.

prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharDataModified events.

newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharDataModified events.

attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.

attrChangeindicates the type of change which triggered the DOMAttrModified event. The values can beMODIFICATION,ADDITION, orREMOVAL.

TheinitMutationEventmethod is used to initialize the value of aMutationEventcreated through theDocumentEventinterface. This method may only be called before theMutationEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

Specifies the event type.

Specifies whether or not the event can bubble.

Specifies whether or not the event's default action can be prevented.

Specifies theEvent's related Node.

Specifies theEvent'sprevValueattribute. This value may be null.

Specifies theEvent'snewValueattribute. This value may be null.

Specifies theEvent'sattrNameattribute. This value may be null.

Specifies theEvent'sattrChangeattribute