mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 14:20:14 +02:00
17 lines
409 B
HTML
17 lines
409 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<body>
|
|
<div id="text" contenteditable>Jan Jongboom</div>
|
|
<script type="application/javascript;version=1.7">
|
|
var t = document.querySelector('#text');
|
|
|
|
t.focus();
|
|
var range = document.createRange();
|
|
range.selectNodeContents(t);
|
|
range.collapse(false);
|
|
var selection = window.getSelection();
|
|
selection.removeAllRanges();
|
|
selection.addRange(range);
|
|
</script>
|
|
</body>
|
|
</html>
|