Editorial: clean up condition logic in navigate event firing#11987
Merged
zcorpan merged 2 commits intowhatwg:mainfrom Dec 4, 2025
Merged
Editorial: clean up condition logic in navigate event firing#11987zcorpan merged 2 commits intowhatwg:mainfrom
zcorpan merged 2 commits intowhatwg:mainfrom
Conversation
"commit a navigate event" is a noop when the navigation is not intercepted in the first place. Instead of calling it and checking for the interception state internally, only call it for intercepted navigations, and rename it to "commit an intercepted navigate event". Also remove internal logic that tests whether the navigation is same-document (intercepted navigations are always same-document).
Member
|
This seems to indeed be editorial. The precommit handler list should be empty if the interception state is "none". |
zcorpan
approved these changes
Dec 4, 2025
noamr
added a commit
to noamr/html
that referenced
this pull request
Dec 16, 2025
This is a step in "commit an intercepted navigate event" that should be done when the event is *not* intercepted. This fixes a bug introduced by whatwg#11952, where accidentally removing an "Otherwise" results in calling "clean up" also for same-document navigations, and a subsequent refactor in whatwg#11987 that makes this more nonsensical.
zcorpan
pushed a commit
that referenced
this pull request
Jan 12, 2026
This fix was wrong and introduced a regression, as committing a same-document non-intercepted navigation should still call `navigatesuccess` etc. Closes #12077.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"commit a navigate event" is a noop when the navigation is not intercepted in the first place.
Instead of calling it and checking for the interception state internally, only call it for intercepted navigations, and rename it to "commit an intercepted navigate event". Also remove internal logic that tests whether the navigation is same-document (intercepted navigations are always same-document).
(See WHATWG Working Mode: Changes for more details.)
/nav-history-apis.html ( diff )