window.addEventListener('urlchange', () => { document.querySelector('h1').textContent="hello world"; }