Node : EventTarget Node represents a node in a tree (usually the DOM/document tree). Node is the base type for %%/Element|Element%%, %%/Text|Text%%, %%/Document|Document%%, %%/Comment|Comment%%, and others. Spec: https://dom.spec.whatwg.org/#interface-node ---- instance.nodeType : Number The type of this Node. Will be one of %%#ELEMENT_NODE|**ELEMENT_NODE**%% %%#ATTRIBUTE_NODE|**ATTRIBUTE_NODE**%% %%#TEXT_NODE|**TEXT_NODE**%% %%#CDATA_SECTION_NODE|**CDATA_SECTION_NODE**%% %%#ENTITY_REFERENCE_NODE|**ENTITY_REFERENCE_NODE**%% %%#ENTITY_NODE|**ENTITY_NODE**%% %%#PROCESSING_INSTRUCTION_NODE|**PROCESSING_INSTRUCTION_NODE**%% %%#COMMENT_NODE|**COMMENT_NODE**%% %%#DOCUMENT_NODE|**DOCUMENT_NODE**%% %%#DOCUMENT_TYPE_NODE|**DOCUMENT_TYPE_NODE**%% %%#DOCUMENT_FRAGMENT_NODE|**DOCUMENT_FRAGMENT_NODE**%% or %%#NOTATION_NODE|**NOTATION_NODE**%%. ReadOnly: true ---- instance.nodeName : String The name of the node. The value of **nodeName** depends on the type of **this**. For %%/Element|**Element**s%%, the **nodeName** is the same as %%/Element#tagName|**Element.tagName**%%. For %%/ProcessingInstruction|**ProcessingInstructions**s%%, the **nodeName** is the same as %%/ProcessingInstruction|**ProcessingInstruction.target**%%. ReadOnly: true ---- instance.baseURI : String ReadOnly: true ---- instance.ownerDocument : Document The Document that owns this Node. foo ReadOnly: true ---- instance.parentNode : Node The parent of **this**. foo ReadOnly: true ---- instance.parentElement : Element The parent of **this**. **parentElement** will return the same value as %%#parentNode|**parentNode**%% if the parent is also an %%/Element|**Element**%%. The %%Document|**document**%% is one **Node** that is not also an %%/Element|**Element**%%. ReadOnly: true ---- prototype.hasChildNodes() : Boolean Returns **true** if **this** has children.
#parent has children
---- instance.childNodes : NodeList A NodeList containing the children Nodes of **this**. See also %%/Element#children|Element.children%%.
Some text A span
ReadOnly: true ---- instance.firstChild : Node The first child Node in **this**. If **this** has no children, **firstChild** will be **null**.
Some text A span
A nested div
ReadOnly: true ---- instance.lastChild : Node The last child Node in **this**. If **this** has no children, **lastChild** will be **null**.
Some text A span
A nested div
ReadOnly: true ---- instance.previousSibling : Node The sibling Node before **this** in %%#parentNode|**this.parentNode**%%'s children. If **this** is the first child in **parentNode** or **this** has no **parentNode**, **previousSibling** will be **null**.
Some text A span
A nested div
ReadOnly: true ---- instance.nextSibling : Node The sibling Node after **this** in %%#parentNode|**this.parentNode**%%'s children. If **this** is the last child in **parentNode** or **this** has no **parentNode**, **nextSibling** will be **null**.
Some text A span
A nested div
ReadOnly: true ---- prototype.compareDocumentPosition(other : Node) : Number 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_CONTAINED_BY**%%, %%#DOCUMENT_POSITION_CONTAINS|**DOCUMENT_POSITION_CONTAINS**%%, %%#DOCUMENT_POSITION_DISCONNECTED|**DOCUMENT_POSITION_DISCONNECTED**%%, %%#DOCUMENT_POSITION_FOLLOWING|**DOCUMENT_POSITION_FOLLOWING**%%, %%#DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|**DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC**%%, or %%#DOCUMENT_POSITION_PRECEDING|**DOCUMENT_POSITION_PRECEDING**%%.
Some text A span
A nested div
---- prototype.contains(other : Node) : Boolean Returns **true** if **other** is a descendant of **this**.
Some text A span
A nested div
Sibling
---- instance.nodeValue : String The text content of **this** (not including any descendants). Note, %%/Element|**Element**%%s do not have text content, the text is placed in a %%/Text|**Text**%% Node inside the **Element**. See also %%#textContent|**textContent**%%. This text becomes a Text Node. So does this. ---- instance.textContent : String The text content of this node and all descendants. See also %%#nodeValue|**nodeValue**%%. This text becomes a Text Node. So does this. ---- prototype.insertBefore(newChild : Node, [refChild : Node]) : Node 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|**appendChild()**%%, %%#removeChild|**removeChild()**%%, and %%#replaceChild|**replaceChild()**%%.
foo
---- prototype.appendChild(newChild : Node) : Node Inserts **newChild** at the end of the children of **this**. Returns **newChild**. See also %%#insertBefore|**insertBefore()**%%, %%#removeChild|**removeChild()**%%, and %%#replaceChild|**replaceChild()**%%.
foo
---- prototype.replaceChild(newChild : Node, oldChild : Node) : Node 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|**appendChild()**%%, %%#insertBefore|**insertBefore()**%%, and %%#removeChild|**removeChild()**%%.
foo
---- prototype.removeChild(oldChild : Node) : Node Removes **oldChild** from the children of **this**. Returns **oldChild**. See also %%#appendChild|**appendChild()**%%, %%#insertBefore|**insertBefore()**%%, and %%#replaceChild|**replaceChild()**%%.
foobar
---- prototype.normalize() : undefined Removes empty %%/Text|**Text**%% nodes within **this** and joins adjacent **Text** nodes into one node.
Text from html.
---- prototype.cloneNode(deep : Boolean) : Node Creates a copy of **this**. Only the %%/Element#attributes|**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. An element with a child. ---- prototype.isEqualNode(arg : Node) : Boolean ---- prototype.lookupPrefix(namespaceURI : String) : String ---- prototype.lookupNamespaceURI(prefix : String) : String ---- prototype.isDefaultNamespace(namespaceURI : Boolean) : Boolean ---- ELEMENT_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an %%/Element|**Element**%%. ReadOnly: true ---- ATTRIBUTE_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an %%/Attr|**Attr**%%. ReadOnly: true ---- TEXT_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an %%/Text|**Text**%%. ReadOnly: true ---- CDATA_SECTION_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an CDATA node. ReadOnly: true ---- ENTITY_REFERENCE_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an entity reference node. ReadOnly: true ---- ENTITY_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is an entity node. ReadOnly: true ---- PROCESSING_INSTRUCTION_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a %%/ProcessingInstruction|**ProcessingInstruction**%%. ReadOnly: true ---- COMMENT_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a %%/Comment|**Comment**%%. ReadOnly: true ---- DOCUMENT_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a %%/Document|**Document**%%. ReadOnly: true ---- DOCUMENT_TYPE_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a %%/DocumentType|**DocumentType**%%. ReadOnly: true ---- DOCUMENT_FRAGMENT_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a %%/DocumentFragment|**DocumentFragment**%%. ReadOnly: true ---- NOTATION_NODE : Number Returned by %%#nodeType|**nodeType**%% when **this** is a notation node. ReadOnly: true ---- DOCUMENT_POSITION_DISCONNECTED : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true ---- DOCUMENT_POSITION_PRECEDING : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true ---- DOCUMENT_POSITION_FOLLOWING : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true ---- DOCUMENT_POSITION_CONTAINS : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true ---- DOCUMENT_POSITION_CONTAINED_BY : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true ---- DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC : Number Bitmask value returned by %%#compareDocumentPosition|**compareDocumentPosition()**%%. ReadOnly: true