Node : EventTarget
Instance Properties
A NodeList containing the children Nodes of this. See also Element.children.
Example:
RunResults:
The first child Node in this. If this has no children, firstChild will be null.
Example:
RunResults:
The last child Node in this. If this has no children, lastChild will be null.
Example:
RunResults:
The sibling Node after this in this.parentNode's children. If this is the last child in parentNode or this has no parentNode, nextSibling will be null.
Example:
RunResults:
The name of the node. The value of nodeName depends on the type of this. For Elements, the nodeName is the same as Element.tagName. For ProcessingInstructionss, the nodeName is the same as ProcessingInstruction.target.
Example:
RunResults:
The type of this Node. Will be one of ELEMENT_NODE ATTRIBUTE_NODE TEXT_NODE CDATA_SECTION_NODE ENTITY_REFERENCE_NODE ENTITY_NODE PROCESSING_INSTRUCTION_NODE COMMENT_NODE DOCUMENT_NODE DOCUMENT_TYPE_NODE DOCUMENT_FRAGMENT_NODE or NOTATION_NODE.
Example:
RunResults:
The text content of this (not including any descendants). Note, Elements do not have text content, the text is placed in a Text Node inside the Element. See also textContent.
Example:
RunResults:
The parent of this. parentElement will return the same value as parentNode if the parent is also an Element. The document is one Node that is not also an Element.
Example:
RunResults:
The sibling Node before this in this.parentNode's children. If this is the first child in parentNode or this has no parentNode, previousSibling will be null.
Example:
RunResults:
Instance Methods
Inserts newChild at the end of the children of this. Returns newChild. See also insertBefore(), removeChild(), and replaceChild().
Example:
RunResults:
Creates a copy of this. Only the attributes of the element are copied (any other properties set will not be copied). If deep is true, all descendants will be copied and added as children of the clone. Otherwise the returned value will not have children.
Example:
RunResults:
Returns a value that indicates where other is relative to this. The return value will be a number that is the bitwise AND (&) of one or more of the following values: DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, or DOCUMENT_POSITION_PRECEDING.
Example:
RunResults:
Inserts newChild before refChild in this. If refChild is not provided, newChild is inserted at the end of the children. Returns newChild. See also appendChild(), removeChild(), and replaceChild().
Example:
RunResults:
Removes oldChild from the children of this. Returns oldChild. See also appendChild(), insertBefore(), and replaceChild().
Example:
RunResults:
Removes oldChild from the children of this and replaces it with newChild (so newChild is in the same position as oldChild was). Returns oldChild. See also appendChild(), insertBefore(), and removeChild().
Example:
RunResults:
Node Properties
Returned by nodeType when this is a DocumentFragment.
Example:
RunResults:
Bitmask value returned by compareDocumentPosition().
Returned by nodeType when this is a ProcessingInstruction.