Name
AbstractView — a window displaying a document
Availability
DOM Level 2 Views
Also Implements
- ViewCSS
If the DOM implementation supports the CSS module, any object that implements the AbstractView interface also implements the ViewCSS interface. For convenience, the method defined by the ViewCSS interface is listed under “Methods.”
Properties
-
readonlyDocumentdocument The Document object that is displayed by this View object. This Document object also implements the DocumentView interface.
Methods
-
getComputedStyle( )[DOM Level 2 CSS] This ViewCSS method returns a read-only CSSStyleDeclaration that represents the computed style information for a specific document element.
Description
In the DOM, a view
is an object that displays a document in
some way. The Window object of client-side JavaScript is such a view.
This AbstractView interface is a very preliminary step toward
standardizing some of the properties and methods of the Window
object. It simply specifies that all View objects have a property
named document that refers to the document they
display. In addition, if an implementation supports CSS style sheets,
all View objects also implement the ViewCSS interface and define a
getComputedStyle( ) method for determining how an
element is actually rendered in the view.
The document property gives every view a reference to the document it displays. The reverse is true also: every document has a reference to the view that displays it. If a DOM implementation supports the View module, ...