Stylus Studio XML Editor

Table of contents

Appendices

1.1 Introduction

Introduction

DOM Events is designed with two main goals. The first goal is the design of an event system which allows registration of event listeners, describes event flow through a tree structure. Additionally, the specification will provide standard modules of events for user interface control and document mutation notifications, including defined contextual information for each of these event modules.

The second goal of the DOM Events is to provide a common subset of the current event systems used in DOM Level 0 browsers. This is intended to foster interoperability of existing scripts and content. It is not expected that this goal will be met with full backwards compatibility. However, the specification attempts to achieve this when possible.

The following sections of the specification define both the specification for the DOM Event Model and a number of conformant event modules designed for use within the model. The DOM Event Model consists of:

  • The [DOM event flow], which describe the flow of events in a tree-based structure.

  • A set of interfaces to access contextual information on events, to register event listeners.

Event flows[top]

Event flows

This document specifies an event flow for tree-based structures: [DOM event flow]. While it is expected that HTML and XML applications will follow this event flow, applications might reuse the interfaces defined in this document for non tree-based structure. In that case, it is the responsibility of such application to define their event flow and how it relates to the [DOM event flow]. As example of such use could be found in [DOMLS].

Conformance[top]

Conformance

An implementation is DOM Level 3 Events conformant if it supports the Core module defined in [DOM2Core], the [DOM event flow] and the interfaces with their associated semantics defined in [Basic interfaces]. An implementation conforms to a DOM Level 3 Events module if it conforms to DOM Level 3 Events and the event types defined in the module. An implementation conforms to an event type if it conforms to its associated semantics and DOM interfaces. For example, an implementation conforms to the DOM Level 3 User Interface Events module (see [User Interface event types]) if it conforms to DOM Level 3 Events (i.e. implements all the basic interfaces), can generate the event types {"http://www.w3.org/2001/xml-events", "DOMActivate"} {"http://www.w3.org/2001/xml-events", "DOMFocusIn"} {"http://www.w3.org/2001/xml-events", "DOMFocusOut"} accordingly to their semantics, supports the UIEvent interface, and conforms to DOM Level 2 Core module.

NOTE: 

An implementation which does not conform to an event module can still implement the DOM interfaces associated with it. The DOM application can then create an event object using the DocumentEvent.createEvent method and dispatch an event type associated with this interface using the EventTarget.dispatchEvent method.

A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "Events" and "3.0" (respectively) to determine whether or not DOM Level 3 Events is supported by the implementation. In order to fully support DOM Level 3 Events, an implementation must also support the "Core" feature defined in the DOM Level 2 Core specification [DOM2Core] and use the [DOM event flow]. For additional information about [conformance], please see the DOM Level 3 Core specification [DOMCore]. DOM Level 3 Events is built on top of DOM Level 2 Events [DOM2Events], i.e. a DOM Level 3 Events implementation where hasFeature("Events", "3.0") returns true must also return true when the version number is "2.0", "" or, null.

Each event module describes its own feature string in the event module listing.