Re: What type should .findAll return

On Fri, Nov 11, 2011 at 5:59 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> On Fri, Nov 11, 2011 at 5:52 PM, Rick Waldron <waldron.rick@gmail.com> wrote:
>> Right, but I'm saying: why create yet more "stuff" in the DOM?
>>
>>  findAll will return a "NodeArray" while querySelectorAll and friends return static and live NodeLists? No thanks.
>
> I'm not sure what you would prefer.  Make findAll return an Array? (We
> miss out on a *lot* of cool and useful stuff we could do.)  Make
> findAll return immutable live NodeLists? (Ditto, but for different
> reasons.)  Change qSA to return a NodeArray or Array? (Would be nice,
> but probably not doable for compat reasons.)

Actually, if we add .item to NodeArray then it's entirely possible
that we can make qSA return a NodeArray. I'm not entirely convinced
that's worth it though.

/ Jonas

Received on Saturday, 12 November 2011 02:05:09 UTC