blob: fa9b53c1ca0decdf2ef552cd3dbec3ecd3fdbdd1 [file]
<style>
.container {
font-family: Monospace;
position: absolute;
}
.content {
position: absolute;
width: max-content;
top: 42px;
}
</style>
<div class=container>
<div id=selection_start class=content>Start selecting this line and continue with the next one</div>
<div id=selection_end class=content style="top: 102px;">pass if there's no selection hairline above this.</div>
</div>
<script>
const selection = window.getSelection();
const range = document.createRange();
range.setStart(selection_start, 0);
range.setEnd(selection_end, 1);
selection.addRange(range);
</script>