<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100px; | |
height: 100px; | |
background-color: black; | |
will-change: transform; | |
} | |
div.changed { | |
translate: 100px; | |
} | |
</style> | |
</head> | |
<body> | |
<div></div> | |
<script> | |
if (window.testRunner) | |
window.testRunner.waitUntilDone(); | |
requestAnimationFrame(() => { | |
document.querySelector("div").classList.add("changed"); | |
if (window.testRunner) | |
window.testRunner.notifyDone(); | |
}); | |
</script> | |
</body> | |
</html> |