Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

getElementsByClassName and getElementsByTagName return live HTMLCollection objects that update when the DOM changes (or rather get re-computed when you access their contents following a DOM change). Depending on what you do with them, you may end up with worse performance compared to the NodeLists returned by querySelectorAll.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: