Re: [csswg-drafts] [scroll-animations-1] Animation.getCurrentTime is easily confused with Animation.currentTime (#8201)

The CSS Working Group just discussed `[scroll-animations-1] Animation.getCurrentTime is easily confused with Animation.currentTime`, and agreed to the following:

* ``RESOLVED: Pending Brian's potential objections, go with `getCurrentTime(rangeName?)` ``

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> s/Topic/Subtopic/<br>
&lt;TabAtkins> flackr: Bikeshedding issue<br>
&lt;TabAtkins> flackr: we added an API to get a range-specific current time<br>
&lt;TabAtkins> flackr: But Brian brought up that when you're not specifying a range, and just getting the time of the timeline, there's already an accessor for that<br>
&lt;TabAtkins> flackr: So q is, should this get a range-specific name, or just consider the .currentTime accessor legacy?<br>
&lt;TabAtkins> flackr: Because one bit about the function is we can return the TypedOM object, rather than just the double that .currentTime returns<br>
&lt;TabAtkins> flackr: I'm slightly in preference to this being the new way to get times, so use a generic name, and have range name specified in options with a property bag as Brian suggested<br>
&lt;TabAtkins> astearns: But Brian thinks we shoudl go with getCurrentTimeForRange()?<br>
&lt;TabAtkins> flackr: Yeah, Brian thinks it's confusing to have another API for something we already have an accessor for<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> flackr: I'm not concerned with calling it getCurrenTtimeForRange(), just need to decide<br>
&lt;TabAtkins> fantasai: My thoughts are we'd add this to get the TypedOM object, and to get it relative to a range.<br>
&lt;TabAtkins> fantasai: Feel like taking a property bag is a little awkward from a usage pov<br>
&lt;TabAtkins> fantasai: I think ranges are a fundamental enough concept that having it just be a string argument is fine<br>
&lt;TabAtkins> flackr: His argument for a property bag is that we dont' want to confused authors, and might want to extend in the future<br>
&lt;TabAtkins> fantasai: Those can go in a property bag<br>
&lt;TabAtkins> astearns: I'm a little concerned with resolving without Brian's okay<br>
&lt;TabAtkins> flackr: Least contentious is to resolve on the ForRange naming, we know Brian is okay with that<br>
&lt;TabAtkins> astearns: fantasai, you okay with ForRange?<br>
&lt;TabAtkins> fantasai: Think it depends on if we want a plain getCurrentTime at any point<br>
&lt;TabAtkins> fantasai: Coujld push to apac call and get Brian on<br>
&lt;fantasai> TabAtkins: I'm mildly against extremely long names, especially if the arg is obvious, extra typing is annoying<br>
&lt;fantasai> TabAtkins: not strongly for/against property bag vs positional argument, but lean towards positional b/c fantasai's arg that it's quite fundamental<br>
&lt;fantasai> TabAtkins: if we put in property bag, we can make an overload later<br>
&lt;fantasai> TabAtkins: for API niceness, I think I like what I believe the spec currently specifies<br>
&lt;fantasai> TabAtkins: getCurrentTime("rangename")<br>
&lt;fantasai> TabAtkins: can add property bag later<br>
&lt;fantasai> flackr: Should we resolve this is what we prefer and ask Brian to take a look?<br>
&lt;TabAtkins> astearns: So proposed reoslution is to use the short name with a string argument, reasons above, ping Brian to see if he wants to object<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: Pending Brian's potential objections, go with `getCurrentTime(rangeName?)`<br>
&lt;bramus> 8192?<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8201#issuecomment-1476492234 using your GitHub account


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

Received on Monday, 20 March 2023 15:53:01 UTC