Skip to content

Fix/v5 ssr streaming add observer to every host - #7060

Merged
johnjenkins merged 1 commit into
v5from
fix/v5-ssr-streaming-add-observer-to-every-host
Nov 27, 2026
Merged

johnjenkins merged 1 commit into
v5from
fix/v5-ssr-streaming-add-observer-to-every-host

Conversation

@johnjenkins

Copy link
Copy Markdown
Contributor

What is the current behavior?

The parse gate watches document with a MutationObserver which that can't see inside shadow roots. A host streamed into a declarative shadow root that no held Stencil host owns isn't released when its end marker arrives - It waits for an unrelated document mutation or DOMContentLoaded

GitHub Issue Number: #7058

What is the new behavior?

Closes #7058

Each held host gets its own observer on its direct children, where the end marker lands.
The observer is disconnected when the host is released or removed.
The observer on document is gone, so flush no longer runs on every mutation in the document while it loads. DOMContentLoaded still releases any host whose marker never arrives.

Documentation

N/A

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

N/A

@johnjenkins
johnjenkins requested a review from a team as a code owner November 27, 2026 17:08
@johnjenkins
johnjenkins changed the base branch from main to v5 November 27, 2026 17:09
@johnjenkins
johnjenkins merged commit eefbda0 into v5 Nov 27, 2026
31 checks passed
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.

bug: v5 streamed SSR host inside a declarative shadow root is not hydrated until the document changes

1 participant