2 Before
<span id=
"sample" style=
"font-family: monospace; -webkit-user-select:none">Test
</span> After
4 <script src=
"../../../../resources/js-test.js"></script>
6 function $(id
) { return document
.getElementById(id
); }
8 var range
= document
.caretRangeFromPoint($('sample').offsetLeft
+ $('sample').offsetWidth
/ 2, $('sample').offsetTop
+ 3);
9 shouldBe('range.startContainer', '$("sample").firstChild');
10 shouldBe('range.startOffset', '2');
11 shouldBeTrue('range.collapsed');
13 if (window
.testRunner
)
14 $('container').outerHTML
= '';