class CustomHeader extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = `
`; this.shadowRoot.getElementById('closeBtn').addEventListener('click', () => { if (!window.close()) { history.back(); } }); // Load feather icons if (window.feather) { window.feather.replace({ class: 'feather-inline' }); } } } customElements.define('custom-header', CustomHeader);