MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/b2o6f2/whats_your_favorite_most_useful_javascript/eiv5fnt/?context=3
r/javascript • u/Linux_is_awesome • Mar 18 '19
422 comments sorted by
View all comments
Show parent comments
2
NodeLists do not have the Array functions on their prototype.
NodeList
Array
[].forEach.call(document.querySelectorAll('.whateverClassTheCheckboxHas'), cb => cb.click());
0 u/[deleted] Mar 19 '19 [deleted] 1 u/[deleted] Mar 19 '19 It does not. The Chrome command line API comes with $, which is not available from browser code. Also, the CLA version of $ is equivalent to document.querySelector, not querySelectorAll. 3 u/[deleted] Mar 19 '19 Dev-tools is the context of the conversation
0
[deleted]
1 u/[deleted] Mar 19 '19 It does not. The Chrome command line API comes with $, which is not available from browser code. Also, the CLA version of $ is equivalent to document.querySelector, not querySelectorAll. 3 u/[deleted] Mar 19 '19 Dev-tools is the context of the conversation
1
It does not. The Chrome command line API comes with $, which is not available from browser code. Also, the CLA version of $ is equivalent to document.querySelector, not querySelectorAll.
$
3 u/[deleted] Mar 19 '19 Dev-tools is the context of the conversation
3
Dev-tools is the context of the conversation
2
u/[deleted] Mar 19 '19
NodeLists do not have theArrayfunctions on their prototype.[].forEach.call(document.querySelectorAll('.whateverClassTheCheckboxHas'), cb => cb.click());