mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00:00
19 lines
431 B
HTML
19 lines
431 B
HTML
<!DOCTYPE HTML><html><head>
|
|
</head>
|
|
<body>
|
|
<span id="x" contenteditable="true">navigable__|unnavigable</span><br />
|
|
<script>
|
|
// Position the caret after "u"
|
|
var sel = window.getSelection();
|
|
sel.removeAllRanges();
|
|
var range = document.createRange();
|
|
var x = document.getElementById('x');
|
|
var t = x.firstChild;
|
|
range.setStart(t, 13);
|
|
range.setEnd(t, 13);
|
|
sel.addRange(range);
|
|
x.focus();
|
|
</script>
|
|
</body>
|
|
</html>
|