WICG / navigation-api

The new navigation API provides a new interface for navigations and session history, with a focus on single-page application navigations.
https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api
484 stars 30 forks source link

Handlers run at the wrong time for history traversal #241

Closed domenic closed 1 year ago

domenic commented 2 years ago

https://wicg.github.io/navigation-api/#navigate-event-traversal-patches fires the navigate event, which synchronously runs the handlers, as the very first thing during a traversal.

But this means the handlers run before the actual entry change, which is inconsistent with push/replace cases. https://whatpr.org/html/6315/history.html#apply-the-history-step step 14.10.3 should execute before we run the handlers.