Revision control

1
<!DOCTYPE html>
2
<body>
3
<pre id="results"></pre>
4
<div id="target" style="position: absolute; top: 0; left: 0; width: 100px; height: 100px; background-color: black;"></div>
5
<script>
6
7
if (window.testRunner) {
8
testRunner.waitUntilDone();
9
testRunner.dumpAsText();
10
}
11
12
const target = document.getElementById("target");
13
target.style.opacity = "0.5";
14
target.style.marginLeft = "100px";
15
setTimeout(() => {
16
target.style.removeProperty("opacity");
17
target.style.removeProperty("margin-left");
18
target.style.transitionProperty = "margin-left opacity";
19
target.style.transitionDuration = "1s";
20
requestAnimationFrame(() => {
21
if (window.internals)
22
document.getElementById("results").innerText = internals.layerTreeAsText(document);
23
if (window.testRunner)
24
testRunner.notifyDone();
25
});
26
});
27
28
</script>
29
</body>