-
Notifications
You must be signed in to change notification settings - Fork 38
Navigation API #34
Copy link
Copy link
Closed
Labels
from: GoogleProposed, edited, or co-edited by Google.Proposed, edited, or co-edited by Google.position: supporttopic: htmlSpec relates to HTML (Hypertext Markup Language)Spec relates to HTML (Hypertext Markup Language)topic: loadingvenue: WHATWG HTML Workstreamvenue: WICGProposal is incubated in the Web Incubator Community GroupProposal is incubated in the Web Incubator Community Group
Metadata
Metadata
Labels
from: GoogleProposed, edited, or co-edited by Google.Proposed, edited, or co-edited by Google.position: supporttopic: htmlSpec relates to HTML (Hypertext Markup Language)Spec relates to HTML (Hypertext Markup Language)topic: loadingvenue: WHATWG HTML Workstreamvenue: WICGProposal is incubated in the Web Incubator Community GroupProposal is incubated in the Web Incubator Community Group
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Request for position on an emerging web specification
Information about the spec
Design reviews and vendor positions
Bugs tracking this feature
Anything else we need to know
Linked explainers explain it well.
From a developer point of view this is a massive leap forward over the existing, kludgy solutions for routing / navigation interception. This is a difficult API to polyfill correctly, but a positive signal from WebKit would allow us to at least know there's a better future on the way.
From a framework implementer point of view, the biggest win with this API would allow us to properly centralize route handling, and perhaps begin to share / reuse more framework agnostic routing mechanisms. Most frameworks today must intercept anchor click events and effectively spoof navigation behavior, and this behavior is generally not compatible across various implementations, and requires a fair bit of (often brittle) code.
Angular : https://github.com/angular/angular/blob/main/packages/router/src/directives/router_link.ts#L396-L415
Vue: https://github.com/vuejs/router/blob/main/packages/router/src/RouterLink.ts#L138-L301
Remix: https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/index.tsx#L270-L301