Draft
Conversation
d365844 to
c113e3b
Compare
01b351c to
acf137f
Compare
4b99ec5 to
c68ff03
Compare
394bd76 to
bb7ce7f
Compare
b23faff to
4a823d7
Compare
|
Now that the Navigation API is baseline, is this something to consider? |
|
|
Member
Author
|
Yep, I've been meaning to come back to it but haven't had the time unfortunately. I might want offer it as a separate entrypoint, say |
|
That makes sense. Do you want to maybe include some of the changes you were thinking about for v3 as well? |
Member
Author
|
Might do, that gets a bit more murky. Will think about it |
02d84b4 to
1ab8157
Compare
* fix: Handle traversal navigation when canIntercept is false For back/forward traversals, canIntercept may be false when the destination entry was created via history.replaceState, but the URL changes regardless. Only gate on canIntercept for push/replace navigations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: Remove non-configurable window.location stub sinon cannot stub window.location in modern browsers as it is non-configurable and non-writable. The stub was a leftover from before the Navigation API refactor — location.assign/replace are no longer used in the router or tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: Fix _top/_parent navigation crashing WTR in CI WTR runs tests inside an iframe. Clicking links with target="_top" or target="_parent" targets the WTR runner frame (canIntercept=false), so calling e.intercept() unconditionally throws and lets the navigation escape — crashing the entire test session. Fix by: - Checking canIntercept before calling e.intercept() in test handlers - Skipping _top/_parent tests (like _blank) since they can't be meaningfully tested in an iframe context Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: Remove unused sinon afterEach cleanup sinon.restore() in afterEach was only needed for the window.location stub which was removed. The remaining sinon.spy (scrollTo) is restored manually. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * revert: Undo traversal/canIntercept handling that broke tests Reverts the isTraversal guard and conditional e.intercept() from router.js, and restores the original test handler behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: Gate navigation intercept on canIntercept check Move canIntercept to the top of the guard conditions so navigations that cannot be intercepted (e.g. back/forward to history.replaceState entries) are skipped cleanly without calling e.intercept(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: Revert scope handler to unconditional intercept Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test: Skip navigation tests, add a big ol' TODO --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Ryan Christian <rchristian@ryanchristian.dev>
cc6b19f to
b4d12f3
Compare
b4d12f3 to
1c1ed26
Compare
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.
No intention of landing this anytime soon, it's still Chrome-only, but it's a fun & promising test.
Blocked on the upcoming.sourceElementproperty, else we can't handle anchortargetattributes correctly.