W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2014

Re: [WebIDL] Remove ArrayClass?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 18 Jul 2014 14:26:41 -0700
Message-ID: <CAAWBYDCs98OhHtArZ8bQVqRHTVOPQ35eRTeu7vU0NF2iVs_Gbw@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Fri, Jul 18, 2014 at 2:21 PM, Dirk Schulze <dschulze@adobe.com> 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.

~TJ
Received on Friday, 18 July 2014 21:27:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:22 UTC