Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<script>
const template = document.createElement("template");
template.innerHTML = "<div><span></span></div>";
const host = template.content.firstElementChild;
host.attachShadow({ mode: "open" });
host.getElementsByTagName("span").length;
document.documentElement.append(host);
</script>