class NavbarCustom extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); this.shadowRoot.innerHTML = ` `; } } customElements.define('nav-custom', NavbarCustom); function showNotifications() { // Create notification modal const modal = document.createElement('div'); modal.className = 'modal'; modal.innerHTML = `
`; document.body.appendChild(modal); // Close modal when clicking outside modal.addEventListener('click', function(e) { if (e.target === modal) { modal.remove(); } }); }