B.1 Changes between DOM Level 2 Events and DOM Level 3 Events
Changes between DOM Level 2 Events and DOM Level 3 Events
This new specification provides a better separation between the
DOM even flow, the event types, and the DOM interfaces.
Changes to DOM Level 2 event flow[top]
Changes to DOM Level 2 event flow
This new specification introduced two new concepts in the event
flow:
-
event groups: unlike DOM Level 2 Events,
stopPropagation does no longer stop the event
propagation entirely. It only stops it for a given event
group.
-
partial ordering of event listeners: within an event group,
event listeners are now ordered while ordering was
unspecified in DOM Level 2 Events.
Changes to DOM Level 2 event types[top]
Changes to DOM Level 2 event types
Lots of clarifications have been made on the event types. The
conformance is now explicity defined against the event types,
and not only the interfaces required by the event types. Support
for namespaces and the feature "BasicEvents" have
been introduced.
The DOM Level 2 Event load event type can now be
dispatched to more [HTML40]
elements. blur and focus have been
clarified and restricted to [HTML40] applications
only.
Changes to DOM Level 2 Events interfaces[top]
Changes to DOM Level 2 Events interfaces
-
Interface
Event
-
The Event interface has a new attribute
namespaceURI, and a four new methods:
isDefaultPrevented, isCustom,
stopImmediatePropagation,
isPropagationStopped,
initEventNS.
-
Interface
EventTarget
-
The EventTarget interface has four new methods:
addEventListenerNS,
removeEventListenerNS,
willTriggerNS,
hasEventListenerNS.
-
Interface
DocumentEvent
-
The Event interface has two new methods:
createEventListenerGroup and
canDispatch.
-
Interface
UIEvent
-
The UIEvent interface has a new method
initUIEventNS.
-
Interface
MouseEvent
-
The MouseEvent interface has a new method
initMouseEventNS and a new attribute
altGraphKey.
-
Interface
MutationEvent
-
The MutationEvent interface has a new method
initMutationEventNS.
-
Exception
EventException
-
The DISPATCH_REQUEST_ERR constant has been
added.
New Interfaces[top]
New Interfaces
The interfaces EventListenerGroup,
CustomEvent, TextEvent,
KeyboardEvent, and MutationNameEvent
were added to the Events module.
|