Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
Zardoz84
2mo ago
0 comments
Share
const $ = document.querySelectorAll
0 comments
default
newest
oldest
Tistron
2mo ago
I usually do
const $ = (s, e = document) => e.querySelector(s)
and a similar one for $$.
recursive
2mo ago
Probably have to bind the this value.
j
/
k
navigate · click thread line to collapse