W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [DOM4] NodeList should be deprecated

From: Ojan Vafai <ojan@chromium.org>
Date: Fri, 16 Mar 2012 18:55:19 -0700
Message-ID: <CANMdWTuVcEh4=1p52K1NE=odnE4RPyuXKvhMJ9XiJxP4Vv3+xg@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: Cameron McCormack <cam@mcc.id.au>, Rick Waldron <waldron.rick@gmail.com>, Adam Klein <adamk@chromium.org>, WebApps WG <public-webapps@w3.org>, Erik Arvidsson <arv@chromium.org>, Ryosuke Niwa <rniwa@chromium.org>
On Wed, Mar 14, 2012 at 5:32 AM, Anne van Kesteren <annevk@opera.com> wrote:

> On Wed, 14 Mar 2012 09:03:23 +0100, Cameron McCormack <cam@mcc.id.au>
> wrote:
>
>> Anne van Kesteren:
>>
>>> Wasn't there a compatibility constrain with doing that?
>>>
>>
>> I don't remember -- the only difference it would make is that
>> Object.getPrototypeOf(**NodeList.prototype) == Array.prototype.
>>
>
> Okay, annotated NodeList with [ArrayClass]. What about HTMLCollection?
> Should I add it there too? Could you take a look at NodeList and
> HTMLCollection for accuracy?
>

Should HTMLCollection inherit from NodeList? All the APIs I can think of
that you'd want to add to NodeList you'd want on HTMLCollection as well.

To be clear, array methods that modify the array in-place would silently do
nothing because the properties on NodeLists/HTMLCollections are read-only.
But you'd be able to use things like forEach and filter.
Received on Saturday, 17 March 2012 01:56:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT