Document in DOM Level 2 Core
The Document interface represents the entire HTML or XML document.
For more information see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document.
Inherits from:
Inerhited by:
Instance Properties
| name | type | description |
|---|---|---|
| attributes | NamedNodeMap | (read only) [from Node] |
| childNodes | NodeList | (read only) [from Node] |
| doctype | DocumentType | (read only) |
| documentElement | Element | (read only) |
| firstChild | Node | (read only) [from Node] |
| implementation | DOMImplementation | (read only) |
| lastChild | Node | (read only) [from Node] |
| localName | String | (read only) [from Node] |
| namespaceURI | String | (read only) [from Node] |
| nextSibling | Node | (read only) [from Node] |
| nodeName | String | (read only) [from Node] |
| nodeType | Number | (read only) [from Node] |
| nodeValue | String | [from Node] |
| ownerDocument | Document | (read only) [from Node] |
| parentNode | Node | (read only) [from Node] |
| prefix | String | [from Node] |
| previousSibling | Node | (read only) [from Node] |
Instance Methods
Description
The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.
Properties that are a Document
| name | object | description |
|---|---|---|
| contentDocument | [html] HTMLObjectElement | (read only) |
| contentDocument | [html] HTMLFrameElement | (read only) |
| contentDocument | [html] HTMLIFrameElement | (read only) |
| ownerDocument | Node | (read only) |
Methods that return a Document
| name | of object | description |
|---|---|---|
| createDocument(namespaceURI,qualifiedName,doctype) | DOMImplementation |