Re: [web-animations] AnimationTimeline comments

(2014/05/19 7:06), Boris Zbarsky wrote:
> On 5/18/14, 6:04 AM, Robert O'Callahan wrote:
>> On Fri, May 16, 2014 at 8:39 AM, Erik Dahlström <
>> <>> wrote:
>>     1. Why is this a method and not an attribute? E.g 'readonly
>>     sequence<AnimationPlayer> players'.
>> WebIDL attributes may not be sequences.
> More importantly, those would be different semantics.  Do we want each
> get to create a new array object, or to return the same one?

That's right. The current intended behavior is to return a new array 
object each time.

That still lets you do some simple operations like check if all 
animations in the document have finished (e.g. so you can take a 
screenshot), e.g.

   var allFinished =
       function(result, player, index) {
         return index && result || player.finished;
       }, true);

However, we also want to be able to use this for an application that 
draws a timeline view of all the animations in the document. In order to 
do a live view, however, we'd really need notifications when that list 
changes in any way (new animations, removed animations, altered 
animations, altered order etc.). I'm not sure yet what a good API for 
that would be yet.

I'm also not sure if timelines should really know what things are 
running against them or if that should be some sort of global lookup 
(e.g. window.getAnimationPlayers(timeline)).


Received on Monday, 19 May 2014 05:19:34 UTC