Re: [web-animations] Confusing variable names in Animatable.animate() examples

On 2015/03/05 15:35, "Сергей Грехов" wrote:
> Hi all,
>
> Animatable.animate()
> (http://w3c.github.io/web-animations/#the-animatable-interface) contains
> the following examples:
>
> EXAMPLE 15
> var anim = elem.animate({ opacity: 0 }, 2000);
>
> is equivalent to:
>
> EXAMPLE 16
> var anim = new Animation(elem, { opacity: 0 }, 2000);
> elem.ownerDocument.timeline.play(anim);
>
> In these examples variable anim is used for AnimationPlayer in Example 15
> and for Animation in Example 16. This may be confusing. It's better to
> rewrite these examples in the following way:
>
> EXAMPLE 15
> var player = elem.animate({ opacity: 0 }, 2000);
>
> is equivalent to:
>
> EXAMPLE 16
> var anim = new Animation(elem, { opacity: 0 }, 2000);
> var player = elem.ownerDocument.timeline.play(anim);
>
> Thank you,
> Sergey G. Grekhov
>

Fixed, thanks!

https://github.com/w3c/web-animations/commit/fbc5bb51af8c49440a0776d4c9df5e39f6a1e75d

Received on Thursday, 9 April 2015 06:30:59 UTC