logoalt Hacker News

anticrymactictoday at 5:07 PM0 repliesview on HN

> so that they don't have to do const $=document.getElementById,

``` const window.$ = (q)=>document.querySelector(q); ``` Emulates the behavior much better. This is already set on modern version of browsers[1]

[1] https://firefox-source-docs.mozilla.org/devtools-user/web_co...