⬛️⬛️⬛️⬛️⬛️⬛️ .innerHTML
⬛️⬛️⬛️⬜️⬜️⬜️ .textContent
⬛️⬛️⬜️⬜️⬜️⬜️ .innerText
⬛️⬜️⬜️⬜️⬜️⬜️ .firstChild.data
- Use innerText if you can't assume structure
- Use Text#data to update existing text
esbench.com/bench/590c9cfe…
- The black boxes are a bar graph showing cost (innerHTML is the slowest)
- This is for setting text (writes), not getting text (reads), though it mostly holds true for reads.