by Aardwolf · 3y ago · 0 comments
Ugh, and here I was thinking this one was the 'better' one to use than innerHTML (if you can get away with it, when needing just unformatted text and not needing the convenience of HTML tags being automatically formatted for you)
See MDN's docs on innerText. It's fully supported in Firefox since version 45 (2016). (Edit: the blog post also has an update at the bottom, noting that, as of 2016, the situation was already much better.)
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement...
It's always been considered better than innerHTML though; it's only textContent people think it's worse than.