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

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 20 Oct 2011 10:12:38 -0400
Message-ID: <4EA02C56.20802@mit.edu>
To: public-webapps@w3.org
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.

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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC