Skip to content

Navigation API: deferred commit #449

Closed

Description

@noamr

WebKittens

No response

Title of the proposal

Navigation API: deferred commit

URL to the spec

https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigateevent-intercept

See PR: whatwg/html#10919

URL to the spec's repository

https://github.com/whatwg/html

Issue Tracker URL

https://github.com/whatwg/html

Explainer URL

https://github.com/WICG/navigation-api/blob/main/README.md#precommit-handlers

TAG Design Review URL

w3ctag/design-reviews#1040

Mozilla standards-positions issue URL

No response

WebKit Bugzilla URL

No response

Radar URL

No response

Description

The current behavior of the navigation API updates the URL and the current history entry immediately when intercepting.
This has been a pain point for early adopters of the API.
This proposal is to make this behavior configurable, allowing the developer using the API to defer the commit behavior and call commit when ready.

Activity

  1. bramus commented on Jan 16, 2025

    @bramus

    This has been a pain point for early adopters of the API.

    See WICG/navigation-api#277 for an example of such a struggle.

  2. jpzwarte commented on Jan 17, 2025

    @jpzwarte

    CC'ing @cdumez because he is one of the committers working on the Navigation API in WebKit (based on the PRs being merged)

  3. added
    topic: web apis
    from: Google
    from: Apple
    and removed
    from: Apple
    on Jan 21, 2025
  4. domenic commented on Feb 7, 2025

    @domenic

    We're planning to slightly expand this proposal with one more method: WICG/navigation-api#279 . (It is quite simple in complexity, consisting of a bunch of error-case checks and then updating the destination URL if all those checks pass.)

  5. annevk commented on Aug 7, 2025

    @annevk
    Contributor

    Colleagues and I suggest marking this as "position: support" one week from now. This seems like a reasonable addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    from: Googleposition: supporttopic: web apisvenue: WHATWG HTML Workstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions