News for hackers. Stuff that matters.
Re:TinyJS – Shorten JavaScript QuerySelect with $ and $$ by SahAssar on Wednesday October 02, 2024 @07:47PM (#41725990)
The title ("TinyJS – Shorten JavaScript QuerySelect with $ and $$") seems to be about these two lines:

    window['$'] = selector => document.querySelector(selector)
    window['$$'] = selector => Array.from(document.querySelectorAll(selector))

The other part is a small & naive (and I mean that in the best way) DOM abstraction.

I think the discussion here seems to be about one or the other, not the thing as a whole.

There are no comments on this comment yet.