```html // とか、このcontentをCEのshadowRootにそのままappendChildしたり <script type="module"> import {content} from "foo.html" with {type: "html"}; document.body.appendChild(content); </script> // ===== // DSDで書かれている中身のHTMLを`import.meta.document`HTML Module documentとして取ってきて、CEに流用できる <template id="myCustomElementTemplate"> <div>...</div> </template> <script type="module"> let importDoc = import.meta.document; class myCustomElement extends HTMLElement { constructor() { super(); let shadowRoot = this.attachShadow({ mode: "open" }); let template = importDoc.getElementById("myCustomElementTemplate"); shadowRoot.appendChild(template.content.cloneNode(true)); } } customElements.define("myCustomElement", myCustomElement); </script> ```
## Others - [Revamped Scoped Custom Element Registries](https://github.com/whatwg/html/issues/10854) - DOM Parts - Style and Theme APIs - open-stylable / `::theme` / exporting parts - `:has-slotted` / `\slot\` - ... ---