class CustomHeader extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
`; // Add event listener for mobile menu toggle setTimeout(() => { const toggleButton = this.shadowRoot.getElementById('mobile-toggle'); const mobileMenu = this.shadowRoot.getElementById('mobile-menu'); toggleButton.addEventListener('click', () => { mobileMenu.classList.toggle('open'); }); // Initialize Feather icons feather.replace(); }, 0); } } customElements.define('custom-header', CustomHeader);