en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Update "Modifying the document" page: element vs. node clarification

Open ltlaitoff opened this issue 10 months ago • 1 comments

The documentation has been synchronized with MDN

These changes might seem insignificant, but they will reduce confusion for developers reading this documentation

For the methods append, prepend, before, after, and replaceWith, the term "node" was replaced with "element" because these methods are actually only available on elements and not on nodes

For the methods appendChild, insertBefore, replaceChild, and removeChild, "parentElem" was replaced with "parentNode" because these methods are available for all types of nodes

The method elem.cloneNode was changed to node.cloneNode because this method supports cloning any type of node, not just elements

ltlaitoff avatar Jan 12 '25 06:01 ltlaitoff

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 12 '25 06:01 CLAassistant