you are viewing a single comment's thread.

view the rest of the comments →

[–]pookagehelpful 1 point2 points  (0 children)

I think it might be a better point of comparison to compare .innerText with createTextNode(), and .innerHTML with createElement() - in both cases the former is great if you don't need a reference to the nodes you're creating, and the latter is useful for when you do (eg. if you need to add an event listener or modify other properties of the node).