Repository navigation
fix(ssr): hold streamed hosts until a server end marker arrives - #7052
Merged
Merged
Conversation
This was referenced Nov 27, 2026
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.
What is the current behavior?
The streaming parse gate treats a host as parsed once the host, or any of its ancestors, has a next sibling. A script that appends to the document mid-stream (portals, toasts, analytics) adds such a sibling, so the host is released early. Depending on where the parser has got to, the declarative shadow root is rejected, the shadow content renders twice, or the component hydrates before its children exist.
GitHub Issue Number: #7049
What is the new behavior?
Closes #7049
<!--e.{hostId}-->as the last child of every hydratable host.DOMContentLoaded.removeHtmlCommentskeeps the marker.Documentation
BREAKING_CHANGES.md: the new marker appears inrenderToString()/streamToString()output.Does this introduce a breaking change?
SSR output gains one comment per host. It's noted in
BREAKING_CHANGES.mdfor anyone with SSR snapshot tests.Testing
<body>. They fail without the fix.Other information
N/A