blob: 2dab74dccd60f3b737a7a57362e28aac85a6cbd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Expose legacy touch event APIs</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const exposeLegacyTouchEventAPIs = 'ontouchstart' in document;
for (const eventHandler of ['ontouchstart', 'ontouchmove', 'ontouchend', 'ontouchcancel']) {
for (const eventTarget of [window, HTMLElement.prototype, SVGElement.prototype, Document.prototype]) {
test(() => {
assert_equals(eventHandler in eventTarget, exposeLegacyTouchEventAPIs);
}, `'${eventHandler}' in ${eventTarget}`);
}
}
</script>
|