blob: f7c87dda05cb4a2a58d24cddf76ba7a497879212 [file] [log] [blame] [edit]
<style>
.flex-box {
display: flex;
flex-direction: column;
font-family: Monospace;
width: 600px;
}
.flex-item {
line-height: 20px;
margin-top: 40px;
}
</style>
<div class=flex-box>
<div id=selection_start class=flex-item>Start selecting this line and continue with the next one</div>
<div id=selection_end class=flex-item>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>