W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2011

Re: What type should .findAll return

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 11 Nov 2011 18:04:08 -0800
Message-ID: <CA+c2ei-QmdUJXh6BN_YOZP77BSiPSEceqKw_UmZVkF-eF295og@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Rick Waldron <waldron.rick@gmail.com>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>, public-webapps <public-webapps@w3.org>
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:07 UTC

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