Re: [WebIDL] Remove ArrayClass?

On Jul 18, 2014, at 11:26 PM, Tab Atkins Jr. <> wrote:

> On Fri, Jul 18, 2014 at 2:21 PM, Dirk Schulze <> wrote:
>> WebIDL currently specifies ArrayClass[1] as:  “it indicates that the internal [[Prototype]] property of its interface prototype object will be the Array prototype object rather than the Object prototype object”.
>> So far ArrayClass was just proposed for the legacy interface DOMRectList recently. In Gecko, ArrayClass is used for MediaLink and two internal, not yet specified interfaces. It seems that most people strongly prefer sequences over ArrayClass. Both, MediaList and DOMRectList (ClientRectList previously) are just implemented with the Array prototype in Gecko (and Servo?). No other browser engine seems to support something like ArrayClass.
>> I would suggest that ArrayClass gets removed and keep the legacy interfaces as implemented in most browsers without Array prototype.
> sequence<Foo> and [ArrayClass] Foo do different things - [ArrayClass]
> subclasses an array, so you can add more attributes/methods, but
> sequence<Foo> is just a plain array holding Foo objects.

The point is that you shouldn’t define interfaces that require more than sequences today I think.


> ~TJ

Received on Friday, 18 July 2014 21:38:09 UTC