class CustomNavbar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; // Inject feather icons script const featherScript = document.createElement('script'); featherScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js'; featherScript.onload = () => { if (typeof feather !== 'undefined') { feather.replace(); } }; this.shadowRoot.appendChild(featherScript); } } customElements.define('custom-navbar', CustomNavbar);