1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8">
6 <title>Test for pointer-events property
</title>
7 <style type=
"text/css" media=
"screen">
18 var pointerEventsValues
= ['auto', 'none'];
22 function clickHit(identifierString
) {
23 var text
= document
.getElementById('text' + identifierString
);
24 text
.textContent
= '-HIT-';
27 function testContent() {
28 if (window
.testRunner
)
29 testRunner
.dumpAsText();
31 var yOffset
= topEdge
;
33 var testContent
= document
.getElementById("test-content");
35 for (var pi
= 0; pi
< pointerEventsValues
.length
; pi
++) {
36 var eventLabel
= document
.createElement('p');
37 eventLabel
.style
.left
= "10px";
38 eventLabel
.style
.top
= yOffset
+ "px";
39 eventLabel
.style
.pointerEvents
= pointerEventsValues
[pi
];
40 eventLabel
.textContent
= pointerEventsValues
[pi
];
41 eventLabel
.setAttribute('onclick', 'clickHit("' + pointerEventsValues
[pi
] + '")');
42 testContent
.appendChild(eventLabel
);
44 var hit
= document
.createElement('p');
45 hit
.style
.left
= "140px";
46 hit
.style
.top
= yOffset
+ "px";
47 hit
.id
= "text" + pointerEventsValues
[pi
];
48 hit
.appendChild(document
.createTextNode("-miss-"));
50 testContent
.appendChild(hit
);
52 if (window
.eventSender
) {
54 eventSender
.mouseMoveTo(15, yOffset
+ 10);
55 eventSender
.mouseDown();
56 eventSender
.mouseUp();
65 <body onload=
"testContent()">
66 <h1>Testing the values of 'pointer-events' on HTML content
</h1>
67 <div>The labels on the left will be clicked and the result is shown to the right
</div>
68 <div id=
"test-content">