 width: 10px;
  height: 10px;
}

</style>

<div>
  <div id=child></div>
</div>
<div class=spacer></div>
<div id=target></div>

<script>
  document.getElementById("target").scrollIntoView(true /* alignToTop */);
  requestAnimationFrame(takeScreenshot);
</script>

</html>
