Skip to content

Commit 8ab67e9

Browse files
committed
[css-animations] Add global animation event handlers
1 parent 21f7b96 commit 8ab67e9

2 files changed

Lines changed: 178 additions & 8 deletions

File tree

css-animations/Overview.bs

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
<h1>CSS Animations Level 1</h1>
22

3+
<style type="text/css">
4+
table.event-handlers {
5+
border-collapse: collapse;
6+
}
7+
table.event-handlers th,
8+
table.event-handlers td {
9+
padding: 0.2em 1em;
10+
}
11+
table.event-handlers td {
12+
border: 1px solid black;
13+
}
14+
</style>
15+
316
<pre class='metadata'>
417
Status: ED
518
Work Status: Refining
@@ -28,6 +41,13 @@ Ignored Terms: domstring, float, animationeventinit, event, eventinit, eventtarg
2841
</pre>
2942
<pre class="anchors">
3043
url: http://w3c.github.io/dom/#constructing-events; type: dfn; text: event constructor;
44+
urlPrefix: https://html.spec.whatwg.org/multipage/webappapis.html; type: dfn; spec: html
45+
text: event handlers
46+
text: event handler event type
47+
text: event handler content attributes
48+
text: event handler IDL attributes
49+
urlPrefix: https://html.spec.whatwg.org/multipage/infrastructure.html; type: dfn; spec: html
50+
text: HTML elements
3151
</pre>
3252
<pre class="link-defaults">
3353
spec:cssom-1; type:interface; text:CSSRule
@@ -885,6 +905,33 @@ Types of <code>AnimationEvent</code></h3>
885905
</ul>
886906
</dl>
887907

908+
### Event handlers on elements, <code>Document</code> objects, and <code>Window</code> objects ### {#event-handlers-on-elements-document-objects-and-window-objects}
909+
910+
The following are the <a>event handlers</a> (and their corresponding <a>event
911+
handler event types</a>) that must be supported by all <a>HTML elements</a>, as
912+
both <a>event handler content attributes</a> and <a>event handler IDL
913+
attributes</a>; and that must be supported by all {{Document}} and {{Window}}
914+
objects, as <a>event handler IDL attributes</a>:
915+
916+
<table class="event-handlers">
917+
<tr>
918+
<th><a>Event handler</a></th>
919+
<th><a>Event handler event type</a></th>
920+
</tr>
921+
<tr>
922+
<td><dfn>onanimationstart</dfn></td>
923+
<td><dfn><a idl>animationstart</a></dfn></td>
924+
</tr>
925+
<tr>
926+
<td><dfn>onanimationiteration</dfn></td>
927+
<td><dfn><a idl>animationiteration</a></dfn></td>
928+
</tr>
929+
<tr>
930+
<td><dfn>onanimationend</dfn></td>
931+
<td><dfn><a idl>animationend</a></dfn></td>
932+
</tr>
933+
</table>
934+
888935
<h2 id="interface-dom">
889936
DOM Interfaces</h2>
890937

@@ -1112,6 +1159,24 @@ The <code>findRule</code> method</h4>
11121159
</div>
11131160

11141161

1162+
<h3 id="interface-globaleventhandlers">
1163+
Extensions to the <code>GlobalEventHandlers</code> Interface</h3>
1164+
1165+
This specification extends the {{GlobalEventHandlers}} interface from HTML to
1166+
add <a>event handler IDL attributes</a> for <a href="#events">animation
1167+
events</a> as defined in [[#event-handlers-on-elements-document-objects-and-window-objects]].
1168+
1169+
<h4 id="interface-globaleventhandlers-idl">
1170+
IDL Definition</h4>
1171+
1172+
<pre class="idl">
1173+
partial interface GlobalEventHandlers {
1174+
attribute EventHandler onanimationstart;
1175+
attribute EventHandler onanimationiteration;
1176+
attribute EventHandler onanimationend;
1177+
};
1178+
</pre>
1179+
11151180

11161181

11171182

0 commit comments

Comments
 (0)