Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<script>
window.addEventListener("DOMContentLoaded", () => {
let sel = document.getSelection()
sel.setPosition(a.offsetParent.attachShadow({mode: "open"}), 0)
sel.extend(b, 0)
c.replaceWith("1")
document.documentElement.innerHTML = document.documentElement.innerHTML
})
</script>
<shadow id="a">
<style id="b"></style>
<font id="c">a</font>