<html>
<head>
    <script src="resources/repaint.js"></script>
    <script>
        function repaintTest()
        {
            var target = document.getElementById("target");
            getSelection().setBaseAndExtent(target.firstChild, 43, target.firstChild, 43);
        }
    </script>
</head>
<body onload="runRepaintTest()">
    <div id="target" style="-webkit-user-modify: read-write; text-align: right; outline: none;">The caret should be at the end of this line</div>
</body>