2 ms·
> so that they don't have to do const $=document.getElementById, ``` const window.$ = (q)=>document.querySelector(q); ``` Emulates the behavior much better.
by anticrymactic 10mo ago
> 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_console/helpers/index.html https://firefox-source-docs.mozilla.org/devtools-user/web_co...
- dapperhn 10mo agoIt is set, but only in the developer console, not for JavaScript included with the website/app.