blob: b97fb5ba650ee548805c17b5627201ffc9adb1d7 [file] [log] [blame]
<html>
<body>
<div style="position:relative; display:inline; border:1px solid black">Div
<a id="anchor" style="border:1px solid red">Anchor</a>
</div>
<br><br>
<span id="result">FAIL! This test has failed because the offsetParent of the anchor is coming back as null :-(</span>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var anchor = document.getElementById("anchor");
var result = document.getElementById("result");
if (anchor.offsetParent)
result.innerHTML = "Success! This test succeeded because the div is rightly recognized as the anchor's offsetParent :-)";
</script>
</body>
</html>