1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <script type=
"text/javascript" language=
"javascript" charset=
"utf-8">
7 document
.onmousedown
= doIt
;
10 var elem
= evt
.target
;
19 <p><b>BUG ID:
</b> <a href=
"rdar://problem/4196646">4196646</a> target returns text node when it should return the parent node
</p>
21 <p id=
"test" style=
"background-color:skyblue; padding:3px;"><b>STEPS TO TEST:
</b>
22 Click where indicated below.
25 <p id=
"success" style=
"background-color:palegreen; padding:3px;"><b>TEST PASS:
</b>
26 After clicking, see alert dialogs as described below.
29 <p id=
"failure" style=
"background-color:#FF3300; padding:3px;"><b>TEST FAIL:
</b>
30 After clicking, see alert dialogs other than what is described below.
31 Specifically, tests #
1 and #
3 below will alert
"[object TEXT]"
34 <p>1. click on this text - you should see an alert that says
"[object P]"</p>
36 <div style=
"border: 1px dotted red; width: 500px; ">2. click on white space next to this text -->
<br>you should see an alert that says
"[object DIV]" -->
</div><br>
38 3. click on this text - you should see an alert that says
"[object BODY]"<br><br>
40 4. click on empty whitespace on this page, below this text - you should see an alert that says
"[object HTML]"