Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Samuel KleosFront End Web Development Techdegree Student 11,762 Points
.getElementsByTagName() vs .querySelectorAll()
In practical terms, if I append an item to a new Nodelist that I want to store somewhere else on the page, what is the benefit of having a live node item, vs a static one?
Live Node Item:
Static Node Item:
Also is there a difference if I add event listeners to array items by looping over an HTML Collection vs Static Nodelist?
Travis AlstrandTreehouse Staff
Hey there Samuel Kleos !
I was getting ready to type out a big response but I found these two pages which honestly explain the differences much better than I ever could
They're both easy reads and shared more info than I was able to think of as well. I hope these shed new light!