Skip to content

[web-animations-1] Non-normative mention of "iterationCount" instead of "iterations" #5097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1691,15 +1691,15 @@ enters the finished state. If notification of the finished state occurred
synchronously this code would cause the <a>finish event</a> to be queued
and the <a>current finished promise</a> to be resolved. However, if we
reverse the order of the two statements such that the
<code>iterationCount</code> is updated first, this would not happen.
<code>iterations</code> is updated first, this would not happen.
To avoid this surprising behavior, notification about the finished state of
an animation is typically performed asynchronously.

<div class='example'><pre class='lang-javascript'>
var animation = elem.animate({ left: '100px' }, 2000);
animation.playbackRate = 2;
animation.currentTime = 1000; // animation is now finished
animation.effect.updateTiming({ iterationCount: 2 }); // animation is no longer finished
animation.effect.updateTiming({ iterations: 2 }); // animation is no longer finished
</pre></div>

The one exception to this asynchronous behavior is when the <a>finish an
Expand Down