Node Methods Flashcards
1
Q
appendChild()
A
Adds a new child node, to the specified node, as the last child node
2
Q
cloneNode()
A
Returns a duplicate of the node on which this method was called
3
Q
compareDocumentPosition()
A
Compares the document position of two nodes
4
Q
contains()
A
Returns a Boolean value indicating whether a node is a descendant of a given node or not
5
Q
hasChildNodes()
A
Returns true if a node has any child nodes, otherwise it returns false
6
Q
insertBefore()
A
Inserts a new child node before a specified, existing, child node
7
Q
isEqualNode()
A
Checks if two nodes are equal
8
Q
normalize()
A
Joins adjacent text nodes and removes empty text nodes
9
Q
removeChild()
A
Removes a child node
10
Q
replaceChild()
A
Replaces a child node