Source code
Revision control
Copy as Markdown
Other Tools
<!doctype html>
<p>Something to <span>find</span> above</p>
<p>Something to <span>find</span> in the shadow</p>
<p>Something to <span>find</span> below</p>
<script>
let selection = getSelection();
selection.removeAllRanges();
for (let span of document.querySelectorAll("span")) {
let range = document.createRange();
range.selectNode(span);
selection.addRange(range);
}
</script>