Re: QSA, the problem with ":scope", and naming

On Oct 20, 2011, at 4:34 PM, Tab Atkins Jr. wrote:

> On Thu, Oct 20, 2011 at 12:09 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>> Let's do the general discussion about how live and non-live NodeLists
>> should behave in a separate thread.
> 
> Yes, let's.  ^_^
> 
> 
>> The immediate question here is how should the returned object from
>> .findAll behave? Should it be mutable? Should you be able to insert
>> non-Nodes into it? Should it have all of the functions of
>> Array.prototype or just some subset? Should it have any additional
>> functions?
>> 
>> Since .findAll is a new function we have absolutely no constraints as
>> far as how NodeLists behave, we can simply return something that isn't
>> a NodeList.
> 
> It should absolutely have all the Array functions.  I know that I want
> to be able to slice, append, forEach, map, and reduce the list
> returned by .find.
> 

IMHO, the most useful thing would be to just return an Array of nodes so no further adjustment of the return value is required in selector engines.

> ~TJ
> 

Received on Friday, 21 October 2011 14:13:29 UTC