Skip to content

[web-animations-1] Expect iterationStart to not be NaN #5507

@cdoublev

Description

@cdoublev

iterations and duration are expected to not be NaN, but not iterationStart. Is there a reason for this or is it just missing?

https://drafts.csswg.org/web-animations-1/#update-the-timing-properties-of-an-animation-effect

Currently in Chrome:

new KeyframeEffect($0, { opacity: [0, 1] }, { iterationStart: NaN })
// Uncaught TypeError: Failed to construct 'KeyframeEffect': The provided double value is non-finite.
new KeyframeEffect($0, { opacity: [0, 1] }, { iterations: NaN })
// Uncaught TypeError: Failed to construct 'KeyframeEffect': iterationCount must be non-negative

EDIT: and same question for all properties of EffectTiming or more exactly, why are they not validated?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions