Skip to content

Commit 7c70c02

Browse files
committed
[scroll-animations-1] Remove getCurrentTime() w3c#8765
1 parent 04df2dd commit 7c70c02

1 file changed

Lines changed: 6 additions & 62 deletions

File tree

scroll-animations-1/Overview.bs

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,67 +1180,6 @@ spec: cssom-view-1; type: dfn;
11801180
it defaults to 100%.
11811181
</dl>
11821182

1183-
## Reporting Timeline Range Progress: the ''getCurrentTime()'' method ## {#named-range-get-time}
1184-
1185-
Progress through named ranges is exposed on the {{AnimationTimeline}} object
1186-
by the {{AnimationTimeline/getCurrentTime()}} method:
1187-
1188-
<pre class="idl">
1189-
dictionary AnimationTimeOptions {
1190-
DOMString? range;
1191-
};
1192-
1193-
[Exposed=Window]
1194-
partial interface AnimationTimeline {
1195-
CSSNumericValue? getCurrentTime(optional AnimationTimeOptions options = {});
1196-
};
1197-
</pre>
1198-
1199-
<div class='methods'>
1200-
<dl>
1201-
<dt><dfn method for=AnimationTimeline lt='getCurrentTime()'>CSSNumericValue? getCurrentTime(optional AnimationCurrentTimeOptions = {})</dfn>
1202-
<dd>
1203-
Returns a representation of the [=timeline/current time=]
1204-
as follows:
1205-
1206-
<dl class="switch">
1207-
<dt>If {{AnimationTimeOptions/range}} is not provided:
1208-
<dd>
1209-
Returns the value of {{AnimationTimeline/currentTime}} on [=this=],
1210-
but representing millisecond values
1211-
as a new {{CSSUnitValue}} in ''ms'' units
1212-
rather than as a double.
1213-
1214-
<dt>If {{AnimationTimeOptions/range}} is provided
1215-
and is a valid [=named timeline range=] on [=this=]:
1216-
<dd>
1217-
Let |progress| be the current progress through that range,
1218-
expressed as a percentage value.
1219-
1220-
Create a [=new unit value=] from (|progress|, "percent")
1221-
and return it.
1222-
1223-
If the start and end points of the [=named timeline range=] coincide,
1224-
return negative infinity for time values earlier or equal to that point,
1225-
and positive infinity for time values after it.
1226-
1227-
<dt>
1228-
If {{AnimationTimeOptions/range}} is provided
1229-
but is not a valid [=named timeline range=] on [=this=]:
1230-
<dd>
1231-
Returns null.
1232-
</dl>
1233-
</div>
1234-
1235-
ISSUE(8201): This method is related to {{AnimationTimeline/currentTime}}
1236-
but not quite the same; should it have a different name?
1237-
1238-
ISSUE: This method returns percentages relative to a ScrollTimeline’s range
1239-
when a range name is provided.
1240-
But for time-based timelines, if a range name is provided,
1241-
should it return percentage progress through that range,
1242-
or time progress through that range?
1243-
12441183
# Appendix B: Timeline Name Scope # {#timeline-name-scope}
12451184

12461185
ISSUE: This section should move to CSS-ANIMATIONS-2.
@@ -1298,13 +1237,18 @@ spec: cssom-view-1; type: dfn;
12981237

12991238
# Changes # {#changes}
13001239

1301-
Changes since the previous
1240+
Changes since the
13021241
(<a href="https://www.w3.org/TR/2023/WD-scroll-animations-1-20230428/">28 April 2023</a>)
13031242
Working Draft include:
13041243

13051244
* Removed <css>scroll-timeline-attachment</css> and <css>view-timeline-attachment</css> in favor of 'timeline-scope'.
13061245
(<a href="https://github.com/w3c/csswg-drafts/issues/7759">Issue 7759</a>)
13071246
* Switched named timelines to use <<dashed-ident>> instead of <<custom-ident>> in order to avoid name clashes with standard CSS keywords.
13081247
(<a href="https://github.com/w3c/csswg-drafts/issues/8746">Issue 8746</a>)
1248+
* Removed {{getCurrentTime()}} API due to various issues in the design.
1249+
(<a href="https://github.com/w3c/csswg-drafts/issues/8765">Issue 8765</a>)
1250+
Progress on an individual animation can now be retrieved using <code>Animation.progress</code>
1251+
(<a href="https://github.com/w3c/csswg-drafts/issues/8799">Issue 8799</a>)
1252+
and other use cases are deferred to Level 2.
13091253

13101254
See also <a href="https://www.w3.org/TR/2023/WD-scroll-animations-1-20230428/#changes">Earlier Changes</a>.

0 commit comments

Comments
 (0)