previous   next   contents   objects   index

WD-DOM-Level-2-19990923

3. Document Object Model Views

Editors
Laurence Cable, Sun
Arnaud Le Hors, W3C

Table of contents

3.1. Introduction

A document may have one or more "views" associated with it, e.g: a computed view on a document after applying a CSS stylesheet, or multiple presentations (e.g HTML Frame) of the same document in a client.

This section defines an AbstractView interface which provides a base interface that all such views shall derive from. It defines an attribute which references the target document.

In the DOM Level 2, there are no subinterfaces of AbstractView defined, it is introduced for use in future revisions.

However, AbstractView is defined in this version to provide a distinguishing attribute; of a Document as a "default" (implementation dependent) view thereof, and of a UIEvent to identify the (implementation dependent) origin of the screenX and screenY attributes therein.

The interfaces found within this section are not mandatory. A DOM application can use the hasFeature method of the DOMImplementation interface to determine whether they are supported or not. The feature string for all the interfaces listed in this section is "Views".

3.2. Interfaces

Interface AbstractView (introduced in DOM Level 2)

A base interface that all views shall derive from.


IDL Definition
// Introduced in DOM Level 2:
interface AbstractView {
  readonly attribute DocumentView     document;
};

Attributes
document of type DocumentView, readonly
The source DocumentView for which, this is an AbstractView of.

Interface DocumentView (introduced in DOM Level 2)

The DocumentView interface is implemented by Document objects in DOM implementations supporting DOM Views. It provides an attribute to retrieve the default view of a document.


IDL Definition
// Introduced in DOM Level 2:
interface DocumentView {
  readonly attribute AbstractView     defaultView;
};

Attributes
defaultView of type AbstractView, readonly
The default AbstractView for this Document, or null if none available.


previous   next   contents   objects   index