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

On 10/20/11 6:50 AM, Alex Russell wrote:
>> Oh, and as a separate issue. I think .findAll should return a plain
>> old JS Array. Not a NodeList or any other type of host object.
>
> I strongly agree that it should be an Array *type*, but I think just
> returning a plain Array is the wrong resolution to our NodeList
> problem. WebIDL should specify that DOM List types *are* Array types.

You missed the point of Jonas's suggestion.

DOM NodeLists are not mutable via direct manipulation of indexed 
properties.  Jonas is saying that we want the return value here to be 
thus mutable.

Making all DOM NodeLists mutable won't really work because a bunch of 
them are live; there's no sane way to combine liveness and mutability.

The non-live lists (e.g. the one involved here) could be made mutable, 
but then why make then nodelists at all?  What's the point?

> It's insane that we even have a NodeList type which isn't a real array
> at all.

It's not at all insane for the live lists.  See previous discussion 
about this.

I think any solution here that tries to treat live and non-live lists 
identically is doomed to failure.

-Boris

Received on Thursday, 20 October 2011 14:13:06 UTC