21 December 2007

Appendix B: Changes

Editors:
Björn Höhrmann
Philippe Le Hégaret, W3C (until November 2003)

B.1 Changes between DOM Level 2 Events and DOM Level 3 Events

Numerous clarifications to the interfaces and event types have been made. The HTMLEvents module is no longer defined in this document. The event types focus and blur have been added to the UIEvents module, the event type dblclick has been added to the MouseEvents module. This new specification provides a better separation between the DOM event flow, the event types, and the DOM interfaces.

B.1.1 Changes to DOM Level 2 event flow

This new specification introduced one new concept in the event flow:

  • ordering of event listeners: event listeners are now ordered while ordering was unspecified in DOM Level 2 Events.

B.1.2 Changes to DOM Level 2 event types

Lots of clarifications have been made on the event types. The conformance is now explicitly defined against the event types, and not only in terms of interfaces required by the event types. Support for namespaces and the features "BasicEvents", "TextEvents", "KeyboardEvents", and "MutationNameEvents" have been introduced.

B.1.3 Changes to DOM Level 2 Events interfaces

Interface Event
The Event interface has two new attributes Event.namespaceURI and Event.defaultPrevented, and two new methods: Event.stopImmediatePropagation(), Event.initEventNS().
Event.timeStamp is now a Number in the ECMAScript binding; a proposed correction to make the same change in [DOM Level 3 Core] is forthcoming.
DOM Level 3 Events considers the Event.type attribute to be case-sensitive, while DOM Level 2 Events considers Event.type to be case-insensitive.
Interface EventTarget
The EventTarget interface has two new methods: EventTarget.addEventListenerNS() and EventTarget.removeEventListenerNS(). The method EventTarget.dispatchEvent() was modified.
Interface DocumentEvent
The DocumentEvent interface has one new method: DocumentEvent.canDispatch().
Interface UIEvent
The UIEvent interface has a new method UIEvent.initUIEventNS().
Interface MouseEvent
The MouseEvent interface has two new methods MouseEvent.getModifierState() and MouseEvent.initMouseEventNS().
Interface MutationEvent
The MutationEvent interface has a new method MutationEvent.initMutationEventNS().
Exception EventException
The DISPATCH_REQUEST_ERR constant has been added.

B.1.4 New Interfaces

The interfaces CustomEvent, TextEvent, KeyboardEvent, MutationNameEvent, MouseMultiWheelEvent, and MouseWheelEvent were added to the Events module.