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

Clients.openWindow() as a navigation method? #227

Open ericlaw1979 opened 2 years ago

ericlaw1979 commented 2 years ago

Does this method need to go in the list of navigation mechanisms? Or no, because it only works in a serviceworker scope?

domenic commented 2 years ago

Great question. I think it falls under this clause which is kind of hidden at the bottom:

Also, HTML calls the navigate algorithm for the initial loads of new browsing contexts as they transition from the initial about:blank; we avoid firing navigate for those since the initial about:blank is such a weird case in general.

Other APIs in this category include include window.open() with a name argument that doesn't point to an existing window (or no name argument), and iframe/embed/object element creation. (Plus other future elements proposed, like portal and fencedframe.)

Maybe we should list these explicitly though, to make it clear we audited them and thought through the non-applicability of the navigation API for their case.