3 ms·
Thanks, this is the more useful bit of the code to me. edit: how about this so you can use array functions too when you need? window.$ = document.querySelecto
by qingcharles 2y ago
Thanks, this is the more useful bit of the code to me.
edit: how about this so you can use array functions too when you need?
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
window.$$$ = (selector) => Array.from(document.querySelectorAll(selector));