1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22

content / test / data / accessibility / event / scroll-vertical-scroll-percent-change.html [blame]

<!--
@WIN-DENY:EVENT_OBJECT_STATECHANGE*
-->
<!DOCTYPE html>
<html>
<body>
  <div id="div" style="width: 200px; height: 200px; overflow: scroll;">
    <div style="height: 400px; background-color: green;">overflow div</div>
  </div>

  <div style="height: 150vh; background-color: yellow;">overflow window</div>

<script>
  function go() {
    // scroll page in the y direction
    window.scrollTo(0, 20);
    // scroll the overflow div in the y direction.
    document.getElementById('div').scrollTo(0, 20);
  }
</script>
</body>
</html>