Re: Selectors: name find method and find signature

On Wed, Sep 11, 2013 at 4:27 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
> If we are going to return an Array subclass as the new way to
> represent a collection of Element objects, we cannot use the name find
> as it is already used by Array. select and selectAll would be better
> names.

Agree.

> In http://krijnhoetmer.nl/irc-logs/whatwg/20130807 Domenic and I also
> discussed the signature of the find method. If we're going to return
> an Array subclass that has the find method on it, why we do need the
> second argument? Especially if you can create your own instances of
> that Array subclass (and you will) it does not seem necessary at all.

That helps when you've *already* run findAll() once, and need to run
it again on the results, but it doesn't help at all when you're
starting with a set of elements, unless we perhaps make a
constructable NodeList and force people to pass their array through
that first.

~TJ

Received on Wednesday, 11 September 2013 11:40:25 UTC