Skip to content

Commit 3e6dbe8

Browse files
author
Sylvain Galineau
committed
[css3-animations] Remove legacy initAnimationEvent() metod; replace with DOM4 constructor (bug 15338)
1 parent 6be0ea9 commit 3e6dbe8

2 files changed

Lines changed: 54 additions & 124 deletions

File tree

css3-animations/Overview.html

Lines changed: 39 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<link href="http://purl.org/dc/terms/" rel=schema.DC>
88
<meta content="CSS Animations" name=DC.title>
99
<meta content=text name=DC.type>
10-
<meta content=2012-10-01 name=DC.issued>
10+
<meta content=2012-10-02 name=DC.issued>
1111
<meta content="http://dev.w3.org/csswg/css3-animations/" name=DC.creator>
1212
<meta content=W3C name=DC.publisher>
13-
<meta content="http://www.w3.org/TR/2012/ED-css3-animations-20121001/"
13+
<meta content="http://www.w3.org/TR/2012/ED-css3-animations-20121002/"
1414
name=DC.identifier>
1515
<link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
1616
rel=DC.rights>
@@ -29,14 +29,14 @@
2929

3030
<h1>CSS Animations</h1>
3131

32-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 1 October 2012</h2>
32+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 2 October 2012</h2>
3333

3434
<dl>
3535
<dt>This version:
3636

3737
<dd><a
38-
href="http://www.w3.org/TR/2012/ED-css3-animations-20121001/">http://dev.w3.org/csswg/css3-animations/</a>
39-
<!--http://www.w3.org/TR/2012/WD-css3-animations-20121001/-->
38+
href="http://www.w3.org/TR/2012/ED-css3-animations-20121002/">http://dev.w3.org/csswg/css3-animations/</a>
39+
<!--http://www.w3.org/TR/2012/WD-css3-animations-20121002/-->
4040

4141
<dt>Latest version:
4242

@@ -207,10 +207,6 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
207207

208208
<li><a href="#AnimationEvent-attributes"><span class=secno>4.1.2.
209209
</span> Attributes</a>
210-
211-
<li><a href="#AnimationEvent-initAnimationMethod"><span
212-
class=secno>4.1.3. </span> The <code>initAnimationEvent</code>
213-
method</a>
214210
</ul>
215211

216212
<li><a href="#AnimationEvent-types"><span class=secno>4.2. </span> Types
@@ -1441,15 +1437,31 @@ <h3 id=AnimationEvent-interface><span class=secno>4.1. </span> Interface <a
14411437
<h4 id=AnimationEvent-IDL><span class=secno>4.1.1. </span> IDL Definition</h4>
14421438

14431439
<pre class=idl>
1444-
interface AnimationEvent : Event {
1445-
readonly attribute DOMString animationName;
1446-
readonly attribute float elapsedTime;
1447-
void initAnimationEvent(in DOMString typeArg,
1448-
in boolean canBubbleArg,
1449-
in boolean cancelableArg,
1450-
in DOMString animationNameArg,
1451-
in float elapsedTimeArg);
1452-
};</pre>
1440+
[Constructor(DOMString <var
1441+
title="">type</var>, optional <a
1442+
href="#AnimationEventInit">AnimationEventInit</a> <var
1443+
title="">eventInitDict</var>)]
1444+
interface AnimationEvent : <a
1445+
class=external
1446+
href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event">Event</a> {
1447+
readonly attribute DOMString <a
1448+
href="#AnimationEvent-animationName"
1449+
title=AnimationEvent-lengthComputable>animationName</a>;
1450+
readonly attribute float <a
1451+
href="#AnimationEvent-elapsedTime"
1452+
title=dom-ProgressEvent-loaded>elapsedTime</a>;
1453+
};
1454+
1455+
dictionary AnimationEventInit : <a
1456+
class=external
1457+
href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#eventinit">EventInit</a> {
1458+
DOMString <span
1459+
title=AnimationEventInit-animationName>animationName</span>;
1460+
float <span
1461+
title=AnimationEventInit-loaded>elapsedTime</span>;
1462+
}
1463+
1464+
</pre>
14531465

14541466
<h4 id=AnimationEvent-attributes><span class=secno>4.1.2. </span>
14551467
Attributes</h4>
@@ -1475,52 +1487,10 @@ <h4 id=AnimationEvent-attributes><span class=secno>4.1.2. </span>
14751487
delay).
14761488
</dl>
14771489

1478-
<h4 id=AnimationEvent-initAnimationMethod><span class=secno>4.1.3. </span>
1479-
The <a href="#initanimationevent"><code>initAnimationEvent</code></a>
1480-
method</h4>
1481-
1482-
<p> The <dfn id=initanimationevent>initAnimationEvent</dfn> method is used
1483-
to initialize the value of an <a
1484-
href="#animationevent"><code>AnimationEvent</code></a> created through the
1485-
<a
1486-
href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-DocumentEvent"><code>DocumentEvent</code></a>
1487-
interface. This method may only be called before the <a
1488-
href="#animationevent"><code>AnimationEvent</code></a> has been dispatched
1489-
via the <code>dispatchEvent</code> method, though it may be called
1490-
multiple times during that phase if necessary. If called multiple times,
1491-
the final invocation takes precedence.
1492-
1493-
<p> Parameters:
1494-
1495-
<dl>
1496-
<dt><code>typeArg</code> of type <code>DOMString</code>
1497-
1498-
<dd> Specifies the event type.
1499-
1500-
<dt><code>canBubbleArg</code> of type <code>boolean</code>
1501-
1502-
<dd> Specifies whether or not the event can bubble.<br>
1503-
1504-
<dt><code>cancelableArg</code> of type <code>boolean</code>
1505-
1506-
<dd> Specifies whether or not the event's default action can be prevented.
1507-
1508-
<dt><code>animationNameArg</code> of type <code>DOMString</code>
1509-
1510-
<dd> Specifies the <a
1511-
href="http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event"><code>Event</code></a><code
1512-
class=css>s animation name.<br>
1513-
</code>
1514-
1515-
<dt><code>elapsedTimeArg</code> of type <code>float</code>
1516-
1517-
<dd> Specifies the amount of time, in seconds, the animation has been
1518-
running at the time of initialization.
1519-
</dl>
1520-
1521-
<p> No Return Value
1522-
1523-
<p> No Exceptions
1490+
<p> <code id=AnimationEvent-constructor>AnimationEvent(type,
1491+
animEventDict)</code> is an <a class=external
1492+
href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor">event
1493+
constructor</a>.
15241494

15251495
<h3 id=AnimationEvent-types><span class=secno>4.2. </span> Types of <a
15261496
href="#animationevent"><code>AnimationEvent</code></a></h3>
@@ -1531,9 +1501,11 @@ <h3 id=AnimationEvent-types><span class=secno>4.2. </span> Types of <a
15311501
<dt><dfn id=animationstart>animationstart</dfn>
15321502

15331503
<dd> The <a href="#animationstart"><code>animationstart</code></a> event
1534-
occurs at the start of the animation. If there is an ’animation-delay'
1535-
then this event will fire once the delay period has expired. A negative
1536-
delay will cause the event to fire with an <a
1504+
occurs at the start of the animation. If there is an ‘<a
1505+
href="#animation-delay"><code
1506+
class=property>animation-delay</code></a>’ then this event will fire
1507+
once the delay period has expired. A negative delay will cause the event
1508+
to fire with an <a
15371509
href="#AnimationEvent-elapsedTime"><code>elapsedTime</code></a> equal to
15381510
the absolute value of the delay.
15391511
<ul>
@@ -2000,9 +1972,6 @@ <h2 class=no-num id=index>Index</h2>
20001972
<li>elapsedTime, <a href="#AnimationEvent-elapsedTime"
20011973
title=elapsedTime><strong>4.1.2.</strong></a>
20021974

2003-
<li>initAnimationEvent, <a href="#initanimationevent"
2004-
title=initAnimationEvent><strong>4.1.3.</strong></a>
2005-
20061975
<li>keyframe declaration block, <a href="#keyframe-declaration-block"
20071976
title="keyframe declaration block"><strong>3.</strong></a>
20081977

css3-animations/Overview.src.html

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,15 +1047,18 @@ <h4 id='AnimationEvent-IDL'>
10471047
IDL Definition</h4>
10481048

10491049
<pre class='idl'>
1050-
interface AnimationEvent : Event {
1051-
readonly attribute DOMString animationName;
1052-
readonly attribute float elapsedTime;
1053-
void initAnimationEvent(in DOMString typeArg,
1054-
in boolean canBubbleArg,
1055-
in boolean cancelableArg,
1056-
in DOMString animationNameArg,
1057-
in float elapsedTimeArg);
1058-
};</pre>
1050+
[Constructor(DOMString <var title="">type</var>, optional <a href="#AnimationEventInit">AnimationEventInit</a> <var title="">eventInitDict</var>)]
1051+
interface AnimationEvent : <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#event">Event</a> {
1052+
readonly attribute DOMString <a href="#AnimationEvent-animationName" title="AnimationEvent-lengthComputable">animationName</a>;
1053+
readonly attribute float <a href="#AnimationEvent-elapsedTime" title="dom-ProgressEvent-loaded">elapsedTime</a>;
1054+
};
1055+
1056+
dictionary AnimationEventInit : <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#eventinit">EventInit</a> {
1057+
DOMString <span title="AnimationEventInit-animationName">animationName</span>;
1058+
float <span title="AnimationEventInit-loaded">elapsedTime</span>;
1059+
}
1060+
1061+
</pre>
10591062

10601063

10611064
<h4 id='AnimationEvent-attributes'>
@@ -1077,52 +1080,10 @@ <h4 id='AnimationEvent-attributes'>
10771080
in which case the event will be fired with an <code>elapsedTime</code> of (-1 * delay).
10781081
</dl>
10791082

1080-
1081-
<h4 id='AnimationEvent-initAnimationMethod'>
1082-
The <code>initAnimationEvent</code> method</h4>
1083-
1084-
<p>
1085-
The <dfn>initAnimationEvent</dfn> method is used to initialize the value of an <code>AnimationEvent</code>
1086-
created through the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-DocumentEvent'><code>DocumentEvent</code></a> interface.
1087-
This method may only be called before the <code>AnimationEvent</code> has been dispatched
1088-
via the <code>dispatchEvent</code> method,
1089-
though it may be called multiple times during that phase if necessary.
1090-
If called multiple times,
1091-
the final invocation takes precedence.
1092-
10931083
<p>
1094-
Parameters:
1095-
1096-
<dl>
1097-
<dt><code>typeArg</code> of type <code>DOMString</code>
1098-
<dd>
1099-
Specifies the event type.
1100-
1101-
<dt><code>canBubbleArg</code> of type <code>boolean</code>
1102-
<dd>
1103-
Specifies whether or not the event can bubble.<br>
1104-
1105-
<dt><code>cancelableArg</code> of type <code>boolean</code>
1106-
<dd>
1107-
Specifies whether or not the event's default action can be prevented.
1108-
1109-
<dt><code>animationNameArg</code> of type <code>DOMString</code>
1110-
<dd>
1111-
Specifies the <a href='http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-Event'><code>Event</code></a>'s animation name.<br>
1112-
1113-
<dt><code>elapsedTimeArg</code> of type <code>float</code>
1114-
<dd>
1115-
Specifies the amount of time,
1116-
in seconds,
1117-
the animation has been running at the time of initialization.
1118-
</dl>
1119-
1120-
<p>
1121-
No Return Value
1122-
1123-
<p>
1124-
No Exceptions
1125-
1084+
<code id="AnimationEvent-constructor">AnimationEvent(type, animEventDict)</code>
1085+
is an <a class="external" href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor">event constructor</a>.
1086+
11261087
<h3 id='AnimationEvent-types'>
11271088
Types of <code>AnimationEvent</code></h3>
11281089

0 commit comments

Comments
 (0)