w3c / w3c/csswg-drafts

[css-animations] Support iterationCount field in animationIteration event

Open
#3,620 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Agenda+ css-animations-2
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Currently the iterationCount variable (field) is missing in the animationiteration event. In some cases - especially when the iteration-count is significant, we might know the exact value: which iteration happens currently.

Simple sample here: https://jsfiddle.net/utasir/4wn52fdo/
In this testcase I had to use a "global" variable to count the iteration, but this sounds as a hack.

Here are the fields, what we have currently in the event object:
iteration

So, my suggestion is: adding a new field which shows the current iteration number.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's description of the CSS animationiteration event and run the linked JSFiddle sample to understand the requested current-iteration value. Check the existing event fields shown in the issue, then define the field's behavior and update the relevant CSS animation event specification so the requested iteration number is precisely documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.