Document Properties

The Document type exposes the following members.

Properties
  NameDescription
Public propertyAttributes

The attributes property returns a live collection of all attribute nodes registered to the specified node. Attributes is a key/value pair of strings that represents any information regarding that attribute.

(Inherited from Node.)
Public propertyBaseURI
The absolute base URI of this node or null if the implementation wasn't able to obtain an absolute URI.
(Overrides NodeBaseURI.)
Public propertyCharacterSet
Gets the document's encoding.
Public propertyCharset
Gets the document's encoding.
Public propertyChildElementCount
Returns the current number of element nodes that are children of this element. 0 if this element has no child nodes that are of nodeType 1.
Public propertyChildNodes

The read-only childNodes property of the Node interface returns a live NodeList of child nodes of the given element where the first child node is assigned index 0. Child nodes include elements, text and comments.

Note: The NodeList being live means that its content is changed each time new children are added or removed.
(Inherited from Node.)
Public propertyChildren
Returns the child elements.
Public propertyContentType
Gets the document content type.
Public propertyContext
Gets the current browsing context.
Public propertyDefaultView
The defaultView IDL attribute of the Document interface, on getting, must return this Document's browsing context's WindowProxy object, if this Document has an associated browsing context, or null otherwise.
Public propertyDoctype
The Document Type Declaration associated with this document.
Public propertyDocumentElement
This is a convenience attribute that allows direct access to the child node that is the document element of the document.
Public propertyDocumentURI
The location of the document or null if undefined or if the Document was created using DOMImplementation.createDocument.
Public propertyFirstChild

The read-only firstChild property of the Node interface returns the node's first child in the tree, or null if the node has no children.

If the node is a Document, this property returns the first node in the list of its direct children.

(Inherited from Node.)
Public propertyFirstElementChild
Returns the first child element node of this element. null if this element has no child elements.
Public propertyImplementation
The DOMImplementation object that handles this document.
Public propertyInputEncoding
Gets the document's encoding.
Public propertyLastChild

The read-only lastChild property of the Node interface returns the last child of the node. If its parent is an element, then the child is generally an element node, a text node, or a comment node. It returns null if there are no child elements

(Inherited from Node.)
Public propertyLastElementChild
Returns the last child element node of this element. null if this element has no child elements.
Public propertyLocalName

Returns the local part of the qualified name of this node. For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

(Inherited from Node.)
Public propertyLocation
The location of the document.
Public propertyNamespaceURI

The Element.namespaceURI read-only property returns the namespace URI of the element, or null if the element is not in a namespace.

(Inherited from Node.)
Public propertyNextElementSibling
Returns the next sibling element node of this element. null if this element has no element sibling nodes that come after this one in the document tree.
Public propertyNextSibling

The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's childNodes, or returns null if the specified node is the last child in the parent element.

(Inherited from Node.)
Public propertyNodeName
The name of this node, depending on its type.
(Overrides NodeNodeName.)
Public propertyNodeType
A code representing the type of the underlying object.
(Overrides NodeNodeType.)
Public propertyNodeValue

The nodeValue property of the Node interface returns or sets the value of the current node.

(Inherited from Node.)
Public propertyOrigin
Gets the document origin.
Public propertyOwnerDocument
Gets the owner document.
(Overrides NodeOwnerDocument.)
Public propertyParentElement

The read-only parentElement property of Node interface returns the DOM node's parent Element, or null if the node either has no parent, or its parent isn't a DOM Element.

(Inherited from Node.)
Public propertyParentNode

The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.

Document and DocumentFragment nodes can never have a parent, so parentNode will always return null. It also returns null if the node has just been created and is not yet attached to the tree.

(Inherited from Node.)
Public propertyPrefix

The prefix read-only property returns the namespace prefix of the specified element, or null if no prefix is specified.

(Inherited from Node.)
Public propertyPreviousElementSibling
Returns the previous sibling element node of this element. null if this element has no element sibling nodes that come before this one in the document tree.
Public propertyPreviousSibling

The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list.

(Inherited from Node.)
Public propertyReadyState
Returns the document readiness. The "loading" while the Document is loading, "interactive" once it is finished parsing but still loading sub-resources, and "complete" once it has loaded.
Public propertyStrictErrorChecking
An attribute specifying whether error checking is enforced or not. When set to false, the implementation is free to not test every possible error case normally defined on DOM operations, and not raise any DOMException on DOM operations or report errors while using Document.normalizeDocument(). In case of error, the behavior is undefined. This attribute is true by default.
Public propertyStyleSheets
A list containing all the style sheets explicitly linked into or embedded in a document. For HTML documents, this includes external style sheets, included via the HTML LINK element, and inline STYLE elements.
Public propertyTextContent

The textContent property of the Node interface represents the text content of the node and its descendants.

(Inherited from Node.)
Public propertyXmlStandalone
An attribute specifying, as part of the XML declaration, whether this document is standalone. This is false when unspecified.
Public propertyXmlVersion
An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if this document supports the "XML" feature, the value is "1.0". If this document does not support the "XML" feature, the value is always null.
See Also