Revision control

1
<body>
2
<style>
3
4
body {
5
background-color: red;
6
}
7
8
div {
9
position: absolute;
10
top: 0;
11
left: 0;
12
width: 400px;
13
height: 400px;
14
background-color: green;
15
transform-origin: top left;
16
transform: scale(0.5);
17
}
18
19
div.scaled-up {
20
transform: scale(1);
21
transition: 2s transform cubic-bezier(0, 200, 1, 200);
22
}
23
24
</style>
25
<div></div>
26
<script src="../resources/ui-helper.js"></script>
27
<script>
28
29
(async function() {
30
if (window.testRunner)
31
testRunner.waitUntilDone();
32
33
await UIHelper.renderingUpdate();
34
document.querySelector("div").classList.add("scaled-up");
35
36
await Promise.all(document.getAnimations().map(animation => animation.ready));
37
await UIHelper.ensurePresentationUpdate();
38
await UIHelper.renderingUpdate();
39
40
if (window.testRunner)
41
testRunner.notifyDone();
42
})();
43
44
</script>
45
</body>