What is node in javascript?

I was wondering what is node in JavaScript?

As in the functions:

element.nodeType row.parentNode.removeChild(row); 
+6
source share
1 answer

A "node", in this context, is simply an HTML element. A “DOM” is a tree structure representing an HTML site, and each HTML element is a “node”. See Document Object Model (DOM) .


In particular, “node” is an interface that is implemented by several other objects, including the “document” and the “element”. All objects that implement the "node" interface can be handled similarly. Therefore, the term "node" (in the context of the DOM) means any object that implements the "node" interface. Most often, this is an element element representing an HTML element.

+10
source

Source: https://habr.com/ru/post/972890/


All Articles