JavaScript Node Methods

You are Here:

JavaScript Node Methods

The following are the list of Node methods available in JavaScript programming.

appendChild()Adds a node to the end of the list of children of a specified parent node.
cloneNode()Creates a copy of a node (including attributes and their values) and returns the clone.
compareDocumentPosition()Compares two given nodes, and returns an integer describing where they are positioned in the document.
contains()Indicates whether a node is a descendant of a specified node.
getRootNode()Returns the context object's root, which optionally includes the shadow root if it is available.
hasChildNodes()Indicates whether the given Node has child nodes or not.
insertBefore()Inserts a new node before the reference node (specified node).
insertAfter()Inserts a new node after the reference node (specified node).
isDefaultNamespace()Returns true if the namespace is the default namespace on the given node or false if not.
isEqualNode()Tests whether two nodes are equal.
isSameNode()Tests whether two nodes are the same.
lookupPrefix()Returns a DOMString containing the prefix for a given namespace URI, if present, and null if not.
lookupNamespaceURI()Accepts a prefix and returns the namespace URI associated with it on the given node, if found, and null if not.
normalize()Joins adjacent text nodes into a single text node and removes empty text nodes.
removeChild()Removes a child node from the DOM and returns the removed node.
replaceChild()Replaces a child node with a new node.


Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author