Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /custom-elements/many-slots-crash.html - WPT Dashboard Interop Dashboard
<template>
<my-elem>
<button>
</my-elem>
</button>
</body>
<slot></slot>
</template>
<script>
const template = document.querySelector('template').content
class MyElement extends HTMLElement {
connectedCallback() {
var shadowRoot = this.attachShadow({ mode: "open" })
shadowRoot.appendChild(document.importNode(template, true))
}
}
customElements.define('my-elem', MyElement);
</script>
<html>
<my-elem></my-elem>