Skip to content

Navigation API: test same-document back() in an iframe - #62425

Open
zcorpan wants to merge 1 commit into
masterfrom
zcorpan/navigation-api-back-same-document-iframe
Open

Navigation API: test same-document back() in an iframe#62425
zcorpan wants to merge 1 commit into
masterfrom
zcorpan/navigation-api-back-same-document-iframe

Conversation

@zcorpan

@zcorpan zcorpan commented Sep 3, 2026

Copy link
Copy Markdown
Member

Same-document traversals initiated from an iframe fire the traverse navigate event later in "apply the history step" than top-level traversals do. Check that committed and finished fulfill, that an intercept() handler runs, and that navigatesuccess fires exactly once.

See whatwg/html#12838

Same-document traversals initiated from an iframe fire the traverse
`navigate` event later in "apply the history step" than top-level
traversals do. Check that `committed` and `finished` fulfill, that an
`intercept()` handler runs, and that `navigatesuccess` fires exactly once.

See whatwg/html#12838
@zcorpan
zcorpan requested a review from noamr September 3, 2026 14:36
@zcorpan

zcorpan commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

Claude found this gap while reviewing the spec PR:

On testability: the top-level effect is already covered by return-value/back.html, ordering-and-transition/back-same-document.html, and back-same-document-intercept.html, all of which the current spec text fails and the PR makes pass. The gap I found is iframes. For a same-document traversal of an iframe the traverse event fires at 12.7, and under the current spec the "set the ongoing navigation to null" at 14.10.1 queues an abort before the afterPotentialUnloads task, so back() in an iframe gets navigateerror, finished rejects, and an intercept() handler never runs. back-forward-multiple-frames.html only awaits committed, so that isn't caught.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants