class CustomHeader extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
`; // Initialize Feather Icons const featherScript = document.createElement('script'); featherScript.src = 'https://unpkg.com/feather-icons'; featherScript.onload = () => { const featherMinScript = document.createElement('script'); featherMinScript.src = 'https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js'; featherMinScript.onload = () => { feather.replace(); }; this.shadowRoot.appendChild(featherMinScript); }; this.shadowRoot.appendChild(featherScript); } } customElements.define('custom-header', CustomHeader);