Files
2023-10-17 15:23:59 +03:00

12 lines
326 B
JavaScript

class CustomContainer extends HTMLElement {
constructor() {
super();
if (!this.shadowRoot) {
const shadow = this.attachShadow({ mode: 'open' });
shadow.innerHTML = 'Hello custom container<slot></slot>';
}
}
}
customElements.define('custom-container', CustomContainer);