Skip to content

Commit d00fb5d

Browse files
stephenmcgruerbirtles
authored andcommitted
[css-transitions] Change TransitionEvent elapsedTime from 'float' to 'double' (w3c#2671)
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 TransitionEvent 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 cbbce0b commit d00fb5d

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

css-transitions-1/Overview.bs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Issue Tracking: Bugzilla bugs for this level https://www.w3.org/Bugs/Public/bugl
4242
Issue Tracking: Bugzilla bugs for all levels https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&product=CSS&component=Transitions&resolution=---
4343
Abstract: CSS Transitions allows property changes in CSS values to occur smoothly over a specified duration.
4444
Status Text: <strong>This document</strong> is expected to be relatively close to last call. While some issues raised have yet to be addressed, new features are extremely unlikely to be considered for this level. <p>The following behaviors are at risk: <ul><li><a href="#discrete-interpolation-at-risk">Interpolation in steps of property types that cannot be interpolated</a></li></ul>
45-
Ignored Terms: float
4645
Ignored Vars: x1, x2, y1, y2
4746
Link Defaults: css-transforms (property) transform
4847
</pre>
@@ -1106,27 +1105,27 @@ associated with transitions.
11061105
Constructor(CSSOMString type, optional TransitionEventInit transitionEventInitDict)]
11071106
interface TransitionEvent : Event {
11081107
readonly attribute CSSOMString propertyName;
1109-
readonly attribute float elapsedTime;
1108+
readonly attribute double elapsedTime;
11101109
readonly attribute CSSOMString pseudoElement;
11111110
};
11121111

11131112
dictionary TransitionEventInit : EventInit {
11141113
CSSOMString propertyName = "";
1115-
float elapsedTime = 0.0;
1114+
double elapsedTime = 0.0;
11161115
CSSOMString pseudoElement = "";
11171116
};
11181117
</pre>
11191118

11201119
### Attributes ### {#interface-transitionevent-attributes}
11211120

1122-
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-propertyName">propertyName</dfn></code> of type <code>CSSOMString</code>, readonly
1121+
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-propertyName">propertyName</dfn></code>
11231122
:: The name of the CSS property associated with the transition.
11241123
<p class="note">Note: This is always the name of a longhand property. See 'transition-property' for how specifying shorthand properties causes transitions on longhands.</p>
1125-
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-elapsedTime">elapsedTime</dfn></code> of type <code>float</code>, readonly
1124+
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-elapsedTime">elapsedTime</dfn></code>
11261125
:: The amount of time the transition has been running, in seconds, when this
11271126
event fired not including any time spent in the delay phase. The precise
11281127
calculation for of this member is defined along with each event type.
1129-
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-pseudoElement">pseudoElement</dfn></code> of type <code>CSSOMString</code>, readonly
1128+
: <code class='attribute-name'><dfn attribute for="TransitionEvent" id="Events-TransitionEvent-pseudoElement">pseudoElement</dfn></code>
11301129
:: The name (beginning with two colons) of the CSS
11311130
pseudo-element on which the transition occurred (in
11321131
which case the target of the event is that

0 commit comments

Comments
 (0)