Re: [web-animations] AnimationTimeline comments

On Sun, 18 May 2014 12:04:51 +0200, Robert O'Callahan  
<robert@ocallahan.org> wrote:

> On Fri, May 16, 2014 at 8:39 AM, Erik Dahlström <ed@opera.com> wrote:
>
>> 1. Why is this a method and not an attribute? E.g 'readonly
>> sequence<AnimationPlayer> players'.
>>
>
> WebIDL attributes may not be sequences.
> http://www.w3.org/TR/WebIDL/#idl-attributes
>
> Rob

It sounds rather java-like to have a get method for this IMHO. In any  
case, if the WebIDL is the limitation then there are surely options, e.g:

interface AnimationPlayerList {
   getter AnimationPlayer? item(unsigned long index);
   readonly attribute unsigned long length;
};

interface AnimationTimeline {
   ...
   readonly AnimationPlayerList? players;
   ...
};


-- 
Erik Dahlstrom, Web Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group

Received on Monday, 19 May 2014 10:53:34 UTC