Skip to content

Navigation and system back

Checked against c1b2fa4 on 2026-11-10. The files it covers are unchanged since.

A niso app runs one document for its whole life. There are no page loads to navigate between, so an app is a single-page app: it changes what’s on screen by changing the DOM, and keeps its place in the History API.

history.pushState, replaceState, popstate, location.hash and hashchange are implemented, which is what client-side routers use. niso-run --url and niso-iced --url start a page at a given route for testing.

What happens when a page navigates to another document (location.href = ..., a plain link to another page) is unverified; keep navigation inside your router.

Not built. The Android back gesture and the iOS edge swipe aren’t routed to the page yet: no host calls history.back() for them, so on Android back leaves the app as it would leave any activity without a back handler.

document.startViewTransition isn’t implemented.