class CustomNavbar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; // Initialize Feather Icons inside Shadow DOM const icons = this.shadowRoot.querySelectorAll('[data-feather]'); icons.forEach(icon => { const iconName = icon.getAttribute('data-feather'); icon.outerHTML = feather.icons[iconName].toSvg({ width: icon.style.width || '24', height: icon.style.height || '24' }); }); } } customElements.define('custom-navbar', CustomNavbar);