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.