News for hackers. Stuff that matters.
Re:jQuery 3.6.0 by arp242 on Tuesday March 02, 2021 @10:46PM (#26324488)
It's annoying that it returns a NodeList which doesn't have some common array-y methods and the like. While these aliases are certainly convenient, the jQuery semantics are much nicer and more intuitive IMO.
Re:jQuery 3.6.0 by tyingq on Wednesday March 03, 2021 @10:17AM (#26329395)
You can, of course, make it more robust, like:

  function $$(sel, parent) {
    var nodes = (parent || document).querySelectorAll(sel);
    return Array.prototype.slice.call(nodes, 0);
  }
Similarly, you can get rid of $$ and fold it all into $, etc. I was trying to be concise in the original response.
Re:jQuery 3.6.0 by arp242 on Friday March 05, 2021 @12:17PM (#26359268)
Yeah, but 19 helper functions later and you've got half of jQuery. I'd rather use a properly tested library.