Re: [csswg-drafts] [web-animations-1] Animation::CurrentTime/ID WebIDL (#5429)

> 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`](https://html.spec.whatwg.org/multipage/media.html#media-elements) 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.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5429#issuecomment-674610850 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 17 August 2020 01:26:56 UTC