XML API for Java ME

Package org.w3c.dom.events

The org.w3c.dom.events package provides the Java ME DOM Events API subset defined by JSR 280.

See: Description

Package org.w3c.dom.events Description

The org.w3c.dom.events package provides the Java ME DOM Events API subset defined by JSR 280. The API is derived from the W3 DOM2 Events API Java bindings source (http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/java-binding.zip), and the DOM3 Events API Java bindings source (http://www.w3.org/TR/2006/WD-DOM-Level-3-Events-20060413/java-binding.zip). The initial version of the JSR 280 modifications was published in October 2006.

Complete list of supported event types

JSR 280 supports all event types defined by DOM level 3. The only exception are event types related to MutationNameEvent which are not supported.

The following table provides a summary of the event types that are required to be supported by the implementation. All events will accomplish the capture and target phases, but not all of them will accomplish the bubbling phase (see also DOM event flow). Some events are not cancelable (see Default actions and cancelable events). Some events will only be dispatched to a specific set of possible targets, specified using node types. Contextual information related to the event type is accessible using DOM interfaces.



type Bubbling phase Cancelable Target node types DOM interface
DOMActivate Yes Yes Element UIEvent
DOMFocusIn Yes No Element UIEvent
DOMFocusOut Yes No Element UIEvent
focus No No Element UIEvent
blur No No Element UIEvent
click Yes Yes Element MouseEvent
mousedown Yes Yes Element MouseEvent
mouseup Yes Yes Element MouseEvent
mouseover Yes Yes Element MouseEvent
mousemove Yes Yes Element MouseEvent
mouseout Yes Yes Element MouseEvent
keydown Yes Yes Element KeyboardEvent
keyup Yes Yes Element KeyboardEvent
DOMSubtreeModified Yes No Document, DocumentFragment, Element, Attr MutationEvent
DOMNodeInserted Yes No Element, Attr, Text, Comment, CDATASection, DocumentType, EntityReference, ProcessingInstruction MutationEvent
DOMNodeRemoved Yes No Element, Attr, Text, Comment, CDATASection, DocumentType, EntityReference, ProcessingInstruction MutationEvent
DOMNodeRemovedFromDocument No No Element, Attr, Text, Comment, CDATASection, DocumentType, EntityReference, ProcessingInstruction MutationEvent
DOMNodeInsertedIntoDocument No No Element, Attr, Text, Comment, CDATASection, DocumentType, EntityReference, ProcessingInstruction MutationEvent
DOMAttrModified Yes No Element MutationEvent
DOMCharacterDataModified Yes No Text, Comment, CDATASection, ProcessingInstruction MutationEvent
load No No Document, Element Event
unload No No Document, Element Event
abort Yes No Element Event
error Yes No Element Event
select Yes No Element Event
resize Yes No Document, Element UIEvent
scroll Yes No Document, Element UIEvent
Extracted from the W3C DOM3 Events specification

The Progress Event 1.0 specification defines the following event types in addition:

type Bubbling phase Cancelable Target node types DOM interface
loadstart No No Element ProgressEvent
progress No No Element ProgressEvent
error No No Element ProgressEvent
abort No No Element ProgressEvent
load No No Element ProgressEvent
Compiled from the W3C Progress Event 1.0 specification

Clarification: The purpose of listing the possible event targets here is to say that an implementation of only DOM Level 3 Events will not dispatch certain event types to certain event targets unless requested to by a DOM application. These listings are not meant to otherwise constrain implementations, applications, or specifications.

As an example, the event load will trigger event listeners attached on Element nodes for that event and on the capture and target phases. This event cannot be cancelled. If an event listener for the load event is attached to a node other than Document or Element nodes, or if it is attached to the bubbling phase only, this event listener cannot be triggered.

The event objects associated with the event types described above may contain context information. Refer to the description of the DOM interfaces for further information.

XML API for Java ME

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Use is subject to License Terms. Your use of this web site or any of its contents or software indicates your agreement to be bound by these License Terms.