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
486 stars 30 forks source link

Call `updateCurrentEntry` and update its state #273

Open GoncharukBro opened 4 months ago

GoncharukBro commented 4 months ago

The updateCurrentEntry method is declared in Navigation, but it is reasonable to declare it in a NavigationHistoryEntry instance as a setState method for better structuring and saving the context of instances, taking into account that when the state changes, the object remains the same with an unchanged id.

The current api is misleading, leaving you thinking that this will result in a new NavigationHistoryEntry instance.