Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html class="reftest-wait">
<style>
.container {
width: 100vw;
height: 100vh;
overflow: hidden;
position: relative;
}
.spacer {
height: 1000vh;
}
#target {
width: 50vw;
height: 50vh;
background-color: rgb(100, 100, 0);
}
</style>
<script src="/common/reftest-wait.js"></script>
<body>
<div class="container">
<div class="spacer"></div>
<div id="target"></div>
</div>
</body>
<script>
async function raf() {
return new Promise((resolve) => {
requestAnimationFrame(() => {
resolve();
});
})
}
window.onload = async () => {
await raf();
await raf();
target.scrollIntoView();
takeScreenshot();
};
</script>
</html>