Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
atscott opened this issue Feb 28, 2025 · 3 comments
Closed

Comments

@atscott
Copy link

atscott commented Feb 28, 2025

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.

@atscott
Copy link
Author

atscott commented Feb 28, 2025

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.

@domenic
Copy link
Member

domenic commented Mar 5, 2025

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!

@atscott
Copy link
Author

atscott commented Mar 5, 2025

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
Development

No branches or pull requests

2 participants