summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/dom/events/non-cancelable-when-passive/non-passive-wheel-event-listener-on-div.html
blob: c49d18ac139a55ac984f27a5edc8b9c9e82292e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<title>non-passive wheel event listener on div</title>
<link rel="help" href="https://w3c.github.io/uievents/#cancelability-of-wheel-events">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/scrolling.js"></script>
<style>
  html, body {
    overflow: hidden;
    margin: 0;
  }
  #div {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: scroll;
  }
</style>
<div class=remove-on-cleanup id=div>
  <div style="height: 200vh"></div>
</div>
<script>
  document.body.onload = () => runTest({
    target: document.getElementById('div'),
    eventName: 'wheel',
    passive: false,
    expectCancelable: true,
  });
</script>