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

Re: [geometry] DOMRectList with legacy

From: Cameron McCormack <cam@mcc.id.au>
Date: Thu, 17 Jul 2014 22:57:19 +1000
Message-ID: <53C7C82F.5020305@mcc.id.au>
To: Dirk Schulze <dschulze@adobe.com>, Anne van Kesteren <annevk@annevk.nl>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>, FX <public-fx@w3.org>, Boris Zbarsky <bzbarsky@MIT.EDU>
On 17/07/14 21:06, Dirk Schulze wrote:
>> On Thu, Jul 17, 2014 at 8:07 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>>> I go with [ArrayClass] and will add the change to the spec soon. We can rename it to LegacyDOMRectList. A note about itís legacy state should definitely be added though.
>> I'm still not convinced [ArrayClass] is a good idea if long term we
>> only want subclassing. Adding [ArrayClass] to a few legacy classes
>> does not help much. They should all have iterator support though. Not
>> exposing the interface still seems like a good idea as well as
>> renaming it to Legacy*.

What do we want for interfaces that expose lists of things -- both 
legacy interfaces, and new ones?  Is just the iterator enough?

I also thought we should try to get rid of [ArrayClass] on DOMRectList, 
but Boris seemed to want to keep it.  I'm not sure if that was motivated 
only by wanting the object to be iterable (which inheriting from 
Array.prototype will give you), or something else.

> As WebIDL, I suppose you mean
> [NoInterfaceObject]
> interface DOMRectList : Array {
>      getter DOMRect item(unsigned long index);
> };

If all we need is the iterator, then:

   interface DOMRectList {
     getter DOMRect item(unsigned long index);

and then some prose to define the iterator behaviour (which is harder 
than it should be currently -- 

If we want a real subclassed Array, then some Web IDL changes are 
needed.  But I agree we probably don't want to bother for a legacy 
interface like this.
Received on Thursday, 17 July 2014 12:57:41 UTC

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