<div style="position: absolute; top: 40px; left: 40px; width: 140px; font-family: ahem; font-size: 20px; direction: rtl;">12345 abcde</div> | |
<div id="result">FAIL: Test did not run</div> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
var offset = document.caretRangeFromPoint(125, 50).startOffset; | |
document.getElementById("result").innerText = offset === 2 ? "PASS" : "FAIL: Hit offset " + offset; | |
</script> |