blob: 0a894d4401e80a7e3528e38e16a06b0cdcbf7acd (
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
|
<html>
<style>
body {
width: 200px;
height: 150px;
padding: 0px;
margin: 0px;
background-color: lightgreen
}
</style>
<body></body>
<script>
function handler(e) {
window.top.postMessage({
"type": "subframe-event",
"eventType": e.type
}, "*");
}
["pointerup", "pointercancel"].forEach(eventType => {
document.body.addEventListener(
eventType,
handler);
});
</script>
</html>
|