3 <title>Transition End Events
</title>
4 <style type=
"text/css" media=
"screen">
11 background-color: blue;
12 -webkit-transition-property: width, left, background-color, height, top;
13 -webkit-transition-duration:
0.2s;
21 background-color: red;
25 <script src=
"transition-end-event-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
26 <script type=
"text/javascript" charset=
"utf-8">
28 var expectedEndEvents = [
29 // [property-name, element-id, elapsed-time, listen]
30 [
"left",
"box1",
0.2, false],
33 function startTransition()
35 var box = document.getElementById(
"box1");
36 box.className =
"box box2";
39 function handleEndEvent(event)
41 recordTransitionEndEvent(event);
43 event.target.style.webkitTransitionProperty =
"none";
44 window.setTimeout(startTransition,
100);
49 var box = document.getElementById(
"box1");
50 box.addEventListener(
"webkitTransitionEnd", handleEndEvent, false);
51 box.className =
"box box1";
54 runTransitionTest(expectedEndEvents,
0.5, setupTest);
60 <p>Initiating transitions on various properties of all boxes.
</p>
63 <div id=
"box1" class=
"box"></div>
66 <div id=
"result"></div>