chromium/third_party/blink/web_tests/http/tests/devtools/elements/resources/elements-panel-shadow-selection-on-refresh.html

<span id="hostElement"></span><span id="closedHostElement"></span>
<script src="elements-panel-shadow-selection-on-refresh.js"></script>
<script>
    var root = document.getElementById("hostElement").attachShadow({mode: 'open'});
    root.innerHTML = "<input type='text'>";
    var closedRoot = document.getElementById("closedHostElement").attachShadow({mode: 'closed'});
    closedRoot.innerHTML = "<button></button>";
</script>