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".
A base interface that all views shall derive from.
// Introduced in DOM Level 2: interface AbstractView { readonly attribute DocumentView document; };
document
of type DocumentView
, readonlyDocumentView
for which, this is an
AbstractView
of.
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.
// Introduced in DOM Level 2: interface DocumentView { readonly attribute AbstractView defaultView; };
defaultView
of type AbstractView
, readonlyAbstractView
for this
Document
, or null
if none
available.