Skip to content
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

[web-animations-1] Animation::CurrentTime/ID WebIDL #5429

Closed
verbessern opened this issue Aug 14, 2020 · 1 comment
Closed

[web-animations-1] Animation::CurrentTime/ID WebIDL #5429

verbessern opened this issue Aug 14, 2020 · 1 comment

Comments

@verbessern
Copy link

verbessern commented Aug 14, 2020

I think, that because the current time is actually a value that is calculated in "4.4.3. The current time of an animation", then in the WebIDL the current time should not be defined as an attribute, but as two functions: get/set. That will also remove the first step of the "silently set the current time" algorithm because the seek time can be defined to be a finite double in the "set" function. The "get" will remain to be unrestricted double as it is now.

The id attribute of an Animation, that is only used for debug purposes, and by my opinion its not a task of a specification to define how the objects are going to debugged, neither to how they will be distinguished between each other, if that is nowhere used in the specification itself. If other specifications are using that field, then maybe that should be defined in the relevant specifications and their WebIDL.

@verbessern verbessern changed the title [web-animations-1] Animation::CurrentTime WebIDL [web-animations-1] Animation::ID WebIDL Aug 14, 2020
@verbessern verbessern changed the title [web-animations-1] Animation::ID WebIDL [web-animations-1] Animation::CurrentTime/ID WebIDL Aug 14, 2020
@birtles
Copy link
Contributor

birtles commented Aug 17, 2020

I think, that because the current time is actually a value that is calculated in "4.4.3. The current time of an animation", then in the WebIDL the current time should not be defined as an attribute, but as two functions: get/set.

It's quite acceptable to use an attribute to report a calculated value and this particular approach was taken to match the HTMLMediaElement.currentTime attribute. Furthermote, this is not shipping in all major browser engines so changing it would not be Web compatible.

The id attribute of an Animation, that is only used for debug purposes, and by my opinion its not a task of a specification to define how the objects are going to debugged

This simply provides a common metadata field that can be conveniently set using the animate() method and which browser DevTools can agree upon as the identifier to use when displaying animations.

@birtles birtles closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants