8 ms·
Only if those methods are added to NodeList, which they haven't been. (and of course 'sortBy' is nonstandard)
by wycats 11y ago
Only if those methods are added to NodeList, which they haven't been.
(and of course 'sortBy' is nonstandard)
- danbruc 11y agoOf course, but you can extend the underlying type. But I can see why you wouldn't want to do that over and over for all collection types. There is probably a tradeoff between reusing the established dot syntax and having a different syntax to be explicit about invoking a non-member function.