10 background-color: blue;
11 -webkit-transition-property: width, left, background-color, height, top;
12 -webkit-transition-duration:
0.2s;
20 background-color: red;
24 <script src=
"transition-end-event-helpers.js"></script>
25 <script type=
"text/javascript">
27 var expectedEndEvents
= [
28 // [property-name, element-id, elapsed-time, listen]
29 ["left", "box1", 0.2, false],
32 function startTransition()
34 var box
= document
.getElementById("box1");
35 box
.className
= "box box2";
38 var firstTimeInHandleEndEvent
= true;
39 function handleEndEvent(event
)
41 recordTransitionEndEvent(event
);
43 event
.target
.style
.webkitTransitionProperty
= "none";
44 if (firstTimeInHandleEndEvent
) {
45 firstTimeInHandleEndEvent
= false;
46 window
.setTimeout(startTransition
, 100);
52 var box
= document
.getElementById("box1");
53 box
.addEventListener("webkitTransitionEnd", handleEndEvent
, false);
54 box
.className
= "box box1";
57 // We need to pass an explicit maxTime because we use two sequential
58 // transitions that each take 0.2s.
59 runTransitionTest(expectedEndEvents
, setupTest
);
64 <p>Initiating transitions on various properties of all boxes.
</p>
67 <div id=
"box1" class=
"box"></div>
70 <div id=
"result"></div>