Re: [web-animations] Is changing fill mode a synchronous action?

On 2015/03/12 13:15, Glen Huang wrote:
> ```js
> elem.style.opacity = 1;
> let anim = elem.animate({ opacity: 0 }, { duration: 500, fill: "forwards"});
> anim.ready.then(() => {
>  anim.effect.timing.fill = "none";
>  console.log(elem.style.opacity);
> });
> ```

Is that supposed to be anim.finished?

> Should it give “1" or “0”? I hope it’s “1”, but giving the sampling nature of keyframe effect, looks like it’s “0”?

If I've understood your example properly, it should be '1'.

The spec currently says,

"Querying the computed style of a property affected by animation, or the 
value of an attribute affected by animation, returns the value based the 
current state of the model, that is, after incorporating any 
modifications made using the programming interface."[1]

But that part of the spec needs to be completely rewritten as do all 
references to sampling which I think is where the confusion might lie in 
this case.

Best regards,

Brian

[1] 
http://localhost:8000/Overview.level-1.html#script-execution-and-live-updates-to-the-model

Received on Thursday, 12 March 2015 04:26:20 UTC