3 <div style=
"position:relative; display:inline; border:1px solid black">Div
4 <a id=
"anchor" style=
"border:1px solid red">Anchor
</a>
7 <span id=
"result">FAIL! This test has failed because the offsetParent of the anchor is coming back as null :-(
</span>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
12 var anchor
= document
.getElementById("anchor");
13 var result
= document
.getElementById("result");
14 if (anchor
.offsetParent
)
15 result
.innerHTML
= "Success! This test succeeded because the div is rightly recognized as the anchor's offsetParent :-)";