Skip to content

Navigation API: Assertion in finish navigate event will fail if handlers reject #11087

Description

@atscott

What is the issue with the HTML Standard?

In the inner navigate event firing algorithm, at the step of waiting for all of promisesList, in the event of a failure, the event's interception state will still be "intercepted". The steps in the rejection handler do not change the event state before calling the finish event given false steps and the first assertion will then fail (Assert: event's interception state is not "intercepted" or "finished".). Either the state needs to be updated before doing this or the assertion should be skipped when finishing the event given false.

Activity

  1. atscott commented on Feb 28, 2025

    @atscott
    Author

    The assertion in https://whatpr.org/html/10919/nav-history-apis.html#potentially-reset-the-focus will also fail. Focus reset is still performed if didFulfill is false, unlike scroll.

  2. domenic commented on Mar 5, 2025

    @domenic
    Member

    I don't think this can occur in the current spec. Step 33.1 sets the state to "committed".

    This may be a problem with PR #10919. Can you check? If so, leaving a comment there would be more helpful.

    Let me close this for now since I am pretty sure the current spec does not have any such bug. If I am wrong, we will definitely reopen!

  3. atscott commented on Mar 5, 2025

    @atscott
    Author

    Ah, yes you’re right. The problem is in the PR - I was having to work off of both versions to get the test fake to support deferred commit

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions