2 <div id=
"start">xx
</div>
3 <div style=
"position: relative; font-family: monospace">
4 <div style=
"display: inline-block">inline block inside selection root
</div>
9 var start
= document
.querySelector('#start'),
10 end
= document
.querySelector('#end');
11 getSelection().setBaseAndExtent(start
.firstChild
, 0, end
.firstChild
, 2);