<span id="text">
The quick brown fox jumped over the lazy dog.
</span>
<script>
var range = document.createRange();
var textNode = document.getElementById("text").firstChild;
range.setStart(textNode, 10);
range.setEnd(textNode, 10);
document.getSelection().addRange(range);
// Readonly caret selections should not be reported to the compositor.
</script>