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

const $ = document.querySelectorAll


I usually do

   const $ = (s, e = document) => e.querySelector(s)
and a similar one for $$.


Probably have to bind the this value.




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

Search: