Skip to content

Truly independent web browser

378 B
Raw Blame
<!DOCTYPE html>
<link rel="match" href="../expected/selection-on-text-under-display-contents-ref.html">
<style>
    .contents { display: contents; }
    .contents::selection { background: lime; color: black; }
</style>
<div id="target"><span class="contents">selected text</span></div>
<script>
    getSelection().selectAllChildren(document.getElementById("target"));
</script>