<!doctype html>
<html>
<div>CONTENT</div>
<script>
const div = document.querySelector("div");
getSelection().setBaseAndExtent(div.firstChild, 0, div.firstChild, 2);
</script>
</html>
<!doctype html>
<html>
<div>CONTENT</div>
<script>
const div = document.querySelector("div");
getSelection().setBaseAndExtent(div.firstChild, 0, div.firstChild, 2);
</script>
</html>