Navigation API demo

I am index.html! I contain a normal link to subpage.html:


This link works without JavaScript and in all browsers. If you Ctrl click or middle-click or right-click to open in a new tab, that will all work as usual.

But if you're using Chromium ≥105, and just activate it without trying to open it in a new window, then it will do a single-page app navigation!

Here is another link, but it's a hash navigation, so it shouldn't get intercepted. You can still watch the console to see what happens with the navigate event:


Here are some buttons for other tests; you can watch your console to see what happens.

(Note: loading spinner control does not yet work for back/forward traversals; that's happening next.) link for accessibility testing

Please don't leave this page

I've canceled the navigation! Please don't leave!

(You can still leave by changing the URL in the URL bar, or closing the window, or using the back button twice in a row without clicking on the page in between.)