@chriscoyier may I trouble you for an update to https://css-tricks.com/snippets/javascript/loop-queryselectorall-matches/ … ? Please add Array.from(), people are copying :)
-
-
Replying to @stoyanstefanov
I can update, but I don't know about that thing. Link me? Snippet me?
1 reply 0 retweets 1 like -
Replying to @chriscoyier
Thanks! Just convert the node list to array like Array.from(document.querySelectorAll).forEach... There are comments in the article too
2 replies 0 retweets 1 like
Replying to @stoyanstefanov @chriscoyier
Avoid `forEach`! `for-of` is even nicer, as it allows `break`. for (const element of document.querySelectorAll(selector)) { // … }
0 replies
1 retweet
4 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.