nodeValue vs innerHTML and textContent. How to choose? [duplicate]

Differences between textContent/innerText/innerHTML on MDN. And a Stackoverflow answer about innerText/nodeValue. Summary innerHTML parses content as HTML, so it takes longer. nodeValue uses straight text, does not parse HTML, and is faster. textContent uses straight text, does not parse HTML, and is faster. innerText Takes styles into consideration. It won’t get hidden text for instance. … Read more