W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

Re: Selectors: name find method and find signature

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 11 Sep 2013 06:29:28 -0700
Message-ID: <CAAWBYDBhX=o1LbCODCNDULY4RZQTe3QvsqHLPFSuWUMuGu7HcA@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: Anne van Kesteren <annevk@annevk.nl>, WebApps WG <public-webapps@w3.org>
On Wed, Sep 11, 2013 at 6:20 AM, Domenic Denicola
<domenic@domenicdenicola.com> wrote:
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>
>> 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.
>
> I believe the idea would be
>
> ```js
> Elements.from(parents).select("selector")
>
> // instead of
>
> document.select("selector", parents)
> ```
>
> For the single-element case, it would be
>
> ```js
> parent.select("selector")
>
> // instead of
>
> document.select("selector", parent)
> ```

The latter is already in the spec.  It's the former I wasn't sure of
our plans about, but I'm fine with.

~TJ
Received on Wednesday, 11 September 2013 13:30:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:13 UTC