Skip to content

Commit 6087644

Browse files
stephenmcgruerbirtles
authored andcommitted
[css-animations] Change AnimationEvent elapsedTime member from 'float' to 'double' (#2666)
As per the web-idl spec, float should only be used if there is a specific reason, as double much more closely matches the ECMAScript Number type. In the case of AnimationEvent there does not appear to be such a reason. Furthermore, switching to double allows the elapsedTime to reach higher values without overflowing. A rough calculation (with some assumptions and possible errors) suggests that this change will raise the celing from ~4.5 hours to years.
1 parent 3b10e5e commit 6087644

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

css-animations-1/Overview.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Former Editor: Sylvain Galineau, Adobe, galineau@adobe.com
3535
Abstract: This CSS module describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior.
3636
3737
Link Defaults: css-values-3 (type) <time>, cssom-1 (interface) cssstyledeclaration, dom-core-ls (interface) event, webidl (type) SyntaxError, css-position-3 (property) left
38-
Ignored Terms: domstring, float, animationeventinit, event, eventinit, eventtarget, document
38+
Ignored Terms: domstring, animationeventinit, event, eventinit, eventtarget, document
3939
</pre>
4040
<pre class="anchors">
4141
url: https://dom.spec.whatwg.org/#constructing-events; type: dfn; text: event constructor;
@@ -909,12 +909,12 @@ IDL Definition</h4>
909909
Constructor(CSSOMString type, optional AnimationEventInit animationEventInitDict)]
910910
interface AnimationEvent : Event {
911911
readonly attribute CSSOMString animationName;
912-
readonly attribute float elapsedTime;
912+
readonly attribute double elapsedTime;
913913
readonly attribute CSSOMString pseudoElement;
914914
};
915915
dictionary AnimationEventInit : EventInit {
916916
CSSOMString animationName = "";
917-
float elapsedTime = 0.0;
917+
double elapsedTime = 0.0;
918918
CSSOMString pseudoElement = "";
919919
};
920920
</pre>
@@ -923,15 +923,15 @@ IDL Definition</h4>
923923
Attributes</h4>
924924

925925
<dl dfn-type=attribute dfn-for=AnimationEvent>
926-
<dt><dfn>animationName</dfn>, of type {{CSSOMString}}, readonly
926+
<dt><dfn>animationName</dfn>
927927
<dd>
928928
The value of the 'animation-name' property of the animation that fired the event.
929-
<dt><dfn>elapsedTime</dfn>, of type float, readonly
929+
<dt><dfn>elapsedTime</dfn>
930930
<dd>
931931
The amount of time the animation has been running, in seconds, when this event fired,
932932
excluding any time the animation was paused. The precise calculation for
933933
of this member is defined along with each event type.
934-
<dt><dfn>pseudoElement</dfn>, of type {{CSSOMString}}, readonly
934+
<dt><dfn>pseudoElement</dfn>
935935
<dd>
936936
The name (beginning with two colons) of the CSS pseudo-element on which the animation
937937
runs (in which case the target of the event is that pseudo-element's corresponding

0 commit comments

Comments
 (0)