<my-component></my-component>
class MyComponent extends HTMLElement {
connectedCallback() {
this.innerHTML = `<h1>Hello world</h1>`;
}
}
customElements.define('my-component', MyComponent);
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.