vents: none;
  }

  .spacer {
    height: 200vh;
  }

</style>

<div id="scroller">
  <div class="spacer"></div>
</div>
<div class="spacer"></div>

<script>
  promise_test(async (t) => {
    let scrolled = new Promise((resolve) => {
      let scrollers = [window, document.getElementById("scroller")];
      let onscroll = (evt) => {
        for (const scroller of scrollers) {
          scroller.removeEventListener("scroll", onscroll);
        }
        resolve(evt.target.id || "root");
      }
      for (con