| <style> |
| .container { |
| font-family: Monospace; |
| position: absolute; |
| } |
| |
| .content { |
| position: absolute; |
| width: max-content; |
| top: 42.5px; |
| } |
| </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: 102.5px;">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> |