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