aboutsummaryrefslogtreecommitdiffstats
path: root/tests/html/pointer_events.html
blob: dc1581f98c326ae02c539260e93b922f25b9ddce (plain) (blame)
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
35
36
<!DOCTYPE html>
<html>
<head>
<style>
#overlay {
    width: 200px;
    height: 150px;
    background: green;
    opacity: 0.5;
    pointer-events: none;
}

button {
    position: relative;
    top: 10px;
    width: 150px;
    height: 50px;
    border: solid black 2px;
    box-sizing: border-box;
    font: Helvetica bold;
    font-size: 18px;
    text-align: center;
    background: black;
    color: white;
}
</style>
</head>
<body>
<button id=button>Click me!</button>
<div id=overlay></div>
<script>
document.getElementById('button').addEventListener('click', function() { alert("Ouch!"); });
</script>
</body>
</html>