Fandom

HTML & CSS Wiki

Node

649pages on
this wiki
Add New Page
Comments0 Share
Line of inheritance:
Object ⇒ Node

Every DOM type (except Window) implements the Node interface.

PropertiesEdit

These properties are available on all Node instances.

firstChildEdit

Data type Node
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

Returns the node's first child in the tree, or null if the node is childless. If the node is a Document, this returns the first node in the list of its direct children.

nextSiblingEdit

Data type Node
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

Returns the node immediately following the current one in the parent's childNodes list, or null if this is the last node in that list.

parentNodeEdit

Data type Node
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

A reference to the node's container/parent, if any.

MethodsEdit

These methods are available on all Node instances.

appendChildEdit

Data type function
Return type Node
Parameter list child (Node)
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

Adds a node to the end of the list of children of a specified parent node. If the node already exists it is removed from its current parent node, then added to the new parent node.

insertBeforeEdit

Data type function
Return type Node
Parameter list newChild (Node), refChild (Node)
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

Inserts newChild before refChild and returns newChild.

replaceChildEdit

Data type function
Return type Node
Parameter list newChild (Node), oldChild (Node)
Standard DOM Level 1DOM Level 2DOM Level 3
Documentation MozillaMicrosoft

Replaces oldChild with newChild and returns oldChild.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.