Skip to content

[chuchi] end domReady of a replaced request too - #13

Open
noah-meierlabs wants to merge 1 commit into
mainfrom
replaced-dom-ready
Open

noah-meierlabs wants to merge 1 commit into
mainfrom
replaced-dom-ready

Conversation

@noah-meierlabs

Copy link
Copy Markdown
Contributor

When a newer request replaces one during its data step, openReq returns after the data barrier without ever readying the DOM barrier. A request listener that awaits routing.domReady() of the replaced request then waits forever.

zipp's studio hit this: on a redirect its onRoute handler opened the new url and awaited dataReady() and domReady() of the old request, and the page loader (counted down in a finally) never finished. zipp works around it now, but the promise should not hang.

Now domReady() of a replaced request resolves with true, like dataReady().

Tested by patching the built Router.js in zipp's studio and running its browser test of the redirect with the old handler: the loader finishes.

🤖 Generated with Claude Code

When a newer request replaced one during its data step, openReq returned
without releasing the DOM barrier, so a listener that awaited domReady of
the replaced request waited forever. zipp's studio did that after a
redirect and its page loader never finished. domReady now resolves with
true there, like dataReady.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant