class MainWindow extends HTMLElement { static observedAttributes = ['width', 'height', 'gap']; constructor() { super(); this.attachShadow({ mode: 'open' }); } connectedCallback() { this.render(); } attributeChangedCallback() { this.render(); } render() { this.shadowRoot.innerHTML = `
`; } } customElements.define('main-window', MainWindow);