Skip to content

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Oct 7, 2025

This protects the navigation API's internal state from fudging when navigate() is called from within a navigateerror handler.

Also inline "promote an upcoming API method tracker".

Closes #11735

(See WHATWG Working Mode: Changes for more details.)


/nav-history-apis.html ( diff )

This protects the navigation API's internal state from fudging when
`navigate()` is called from within a `navigateerror` handler.

Also inline "promote an upcoming API method tracker".

Closes whatwg#11735
Copy link

@jnjaeschke jnjaeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this solves the issue. We need to retain the navigation's upcoming non-traverse API method tracker before firing the navigate error event, because that can run script, and re-apply it afterwards.

(sorry, I don't have permission to request changes)


<li><p><span>Promote an upcoming API method tracker to ongoing</span> given
<var>navigation</var> and <var>destinationKey</var>.</p></li>
<li><p>Let <var>upcomingMethodTracker</var> be <var>navigation</var>'s <span>upcoming

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think we need this here. It should be fine the way it was in the old version (directly move the upcoming non-traverse API method tracker into the ongoing API method tracker slot).

@noamr
Copy link
Collaborator Author

noamr commented Oct 8, 2025

I don't think this solves the issue. We need to retain the navigation's upcoming non-traverse API method tracker before firing the navigate error event, because that can run script, and re-apply it afterwards.

(sorry, I don't have permission to request changes)

OK, I want to wait until #11725 is merged (cc @zcorpan) before revising this then.

@zcorpan
Copy link
Member

zcorpan commented Oct 8, 2025

OK, I want to wait until #11725 is merged (cc @zcorpan) before revising this then.

Reviewed and merged now.

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

Successfully merging this pull request may close these issues.

Navigation API: upcoming API method tracker is not null if navigate is called from onnavigateerror
3 participants