Skip to content

Infinite animations don't increment the iteration count #45989

Closed

Description

@Loirooriol
<!DOCTYPE html>
<style>
@keyframes keyframes {}
:root { animation: 1s -4s infinite keyframes }
</style>
<script>
document.documentElement.addEventListener("animationiteration", e => {
 console.log(e.elapsedTime);
});
</script>

Expected:

5
6
7
...

Actual:

0
0
0
...

It's only incremented for finite animations: https://github.com/servo/stylo/blob/89499265377cfdf48b9257531259b02642aafa06/style/servo/animation.rs#L608-L610

Activity

  1. self-assigned this
    on Jun 25, 2026
  2. added a commit that references this issue on Jun 26, 2026
    5088faa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions