Re: [geometry] DOMRectList with legacy

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:

   [NoInterfaceObject]
   interface DOMRectList {
     getter DOMRect item(unsigned long index);
     iterator;
   };

and then some prose to define the iterator behaviour (which is harder 
than it should be currently -- 
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26183).

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:40 UTC