Comment by anticrymactic
Comment by anticrymactic 2 days 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_co...
It is set, but only in the developer console, not for JavaScript included with the website/app.