W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [css3-animations] AnimationEvent.elapsedTime "not affected" by animation-delay?

From: Dean Jackson <dino@apple.com>
Date: Tue, 05 Apr 2011 10:30:09 +1000
Cc: www-style@w3.org
Message-id: <587B3C05-CA1F-41C1-BA51-EA93C42B82F3@apple.com>
To: "L. David Baron" <dbaron@dbaron.org>

On 03/04/2011, at 4:01 PM, L. David Baron wrote:

> http://dev.w3.org/csswg/css3-animations/#Events-AnimationEvent says:
>  # Note that this value is not affected by the value of
>  # animation-delay.
> 
> That doesn't really help me understand which way to handle
> animation-delay.   Does it mean that the elapsed time counts
> starting from the start of the delay, or starting from the end of
> the delay?  I'm guessing it means from the end of the delay (i.e.,
> when the first iteration began).

Correct. elapsedTime is 0 when the animation really begins to do something.

If you have a positive delay, it's as if elapsedTime begins counting upwards from -delay, and then when it hits 0 you get the event.

> (If that's the case, then what happens when the delay is negative?
> No animationstart event at all, animationstart event with 0
> elapsedTime, or animationstart event with positive elapsedTime?)

Good question. I suggest animationstart with a positive elapsedTime.

Dean
Received on Tuesday, 5 April 2011 00:30:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT