Skip to content

Commit d00fb5d

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

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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: This document 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.

The following behaviors are at risk:

45-
Ignored Terms: float
4645
Ignored Vars: x1, x2, y1, y2
4746
Link Defaults: css-transforms (property) transform
4847
@@ -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
11191118

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

1122-
: propertyName of type CSSOMString, readonly
1121+
: propertyName
11231122
:: The name of the CSS property associated with the transition.
11241123

Note: This is always the name of a longhand property. See 'transition-property' for how specifying shorthand properties causes transitions on longhands.

1125-
: elapsedTime of type float, readonly
1124+
: elapsedTime
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-
: pseudoElement of type CSSOMString, readonly
1128+
: pseudoElement
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)