class HelloWorldComponent extends HTMLElement { constructor() { super(); } connectedCallback() { const shadowRoot = this.attachShadow({mode: "open"}); shadowRoot.innerHTML = `
Hello World!
`; } } window.customElements.define("hello-world", HelloWorldComponent);