Skip to content

[web-animations-2] Web IDL validation errors #9355

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

Open
autokagami opened this issue Sep 14, 2023 · 4 comments
Open

[web-animations-2] Web IDL validation errors #9355

autokagami opened this issue Sep 14, 2023 · 4 comments
Labels
web-animations-2 Current Work

Comments

@autokagami
Copy link
Contributor

autokagami commented Sep 14, 2023

🤖 This is an automatic issue report for Web IDL validation error. 🤖

The bot found validation errors but couldn't fix them automatically, since there is no proper autofix for them. Please check the following messages and fix them.

  • Validation error at line 6 in web-animations-2,1, inside `interface Animation -> attribute rangeStart`:
        attribute (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue
                   ^
    

    Error: Attributes cannot accept dictionary types.

  • Validation error at line 7 in web-animations-2,1, inside `interface Animation -> attribute rangeEnd`:
        attribute (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue
                   ^
    

    Error: Attributes cannot accept dictionary types.

Please file an issue at https://github.com/saschanaz/webidl-updater/issues/new if you think this is invalid or should be enhanced.

@tabatkins
Copy link
Member

Note: this is for KeyframeAnimationOptions.

Indeed, dictionaries aren't allowed as attribute types (because an attribute type gives both the setter's input type and the getter's output type, and dictionaries aren't allowed as output types). There's an issue to separate getters and setters which would allow solving this, but for now I think, unfortunately, the only correct answer is to make the attribute any type and do the type-conversion manually in the setter algo.

@tabatkins tabatkins added the web-animations-2 Current Work label Sep 14, 2023
@saschanaz

This comment was marked as outdated.

@saschanaz
Copy link
Member

saschanaz commented Sep 14, 2023

No actually, the bot was right and #9181 added those actual attributes yesterday:

[Exposed=Window]
partial interface Animation {
attribute CSSNumberish? startTime;
attribute CSSNumberish? currentTime;
attribute (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart;
attribute (TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd;
};

But then the build failed and was not applied to the published editor's draft.

@kevers-google, do you want to take a look? (I wonder how the CI build never happened in the PR but only the IPR check)

@kevers-google
Copy link
Contributor

I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web-animations-2 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants