4 function showElement(x
, y
) {
6 testRunner
.dumpAsText();
8 var result
= document
.getElementById('res');
9 var myElement
= document
.elementFromPoint(x
, y
);
10 if (myElement
== document
.getElementById('tf'))
11 result
.innerHTML
= "Test Passed";
15 <body onload=
"showElement(15, 30)">
16 This tests that elementFromPoint will get the input element.
17 <input id=
"tf" style=
"-khtml-appearance: textfield; position: absolute; top: 25; left: 10;"></input>
18 <div id=
"res" style=
"position: absolute; top: 50; left: 10;">Test Failed
</div>