Re: Selectors: name find method and find signature

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