navigation-ponyfill
A JavaScript ponyfill for the browser's new Navigation API. It implements navigation.canGoBack and the currententrychange event to enable near-perfect back buttons with almost zero edge cases, which is very tricky with the older History API. A new PR adds entries() and currentEntry support, and future work plans full-blown navigations with navigation interceptors so framework router implementations can be built wholly on the Navigation API instead of history.pushState/replaceState.
What it addresses
Implementing reliable back buttons with (almost) zero edge cases is surprisingly very tricky with the older History API.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
navigation-ponyfill
A JavaScript ponyfill for the browser's new Navigation API. It implements navigation.canGoBack and the currententrychange event to enable near-perfect back buttons with almost zero edge cases, which is very tricky with the older History API. A new PR adds entries() and currentEntry support, and future work plans full-blown navigations with navigation interceptors so framework router implementations can be built wholly on the Navigation API instead of history.pushState/replaceState.
Problem: Implementing reliable back buttons with (almost) zero edge cases is surprisingly very tricky with the older History API.
Posted by @kcrwfrd_ · Original source ↗
Source text · @kcrwfrd_ · · Source ↗
I've been working on a polyfill for the new Navigation API: https://github.com/kcrwfrd/navigation-ponyfill