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.5s;
16 <script src="end-event-helpers.js" type="text/javascript" charset="utf-8"></script>
17 <script type="text/javascript" charset="utf-8">
18 if (window.layoutTestController) {
19 layoutTestController.dumpAsText();
20 layoutTestController.waitUntilDone();
24 ["background-color", "box1", "webkitTransitionEnd", 0.5],
25 ["height", "box1", "webkitTransitionEnd", 0.5],
26 ["left", "box1", "webkitTransitionEnd", 0.5],
27 ["width", "box1", "webkitTransitionEnd", 0.5],
30 function startTransition()
32 var boxes = document.body.getElementsByClassName('box');
33 for (var i = 0; i < boxes.length; ++i) {
34 boxes[i].addEventListener("webkitTransitionEnd", recordEvent, false);
35 boxes[i].style.width = "150px";
36 boxes[i].style.left = '200px';
37 boxes[i].style.backgroundColor = 'red';
38 boxes[i].style.height = '80px';
41 window.setTimeout(cleanup, 700);
44 window.addEventListener('load', startTransition, false);
49 <p>Initiating a 500ms transition on the left, background-color, width and height properties of box1.</p>
52 <div id="box1" class="box"></div>
55 <div id="result"></div>