[DOM] Fix Fragment dispatchEvent when the container is a Document - #37165
Merged
Conversation
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
July 31, 2026 19:14
50c41c4 to
9ed52f6
Compare
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
July 31, 2026 20:15
9ed52f6 to
183e79d
Compare
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
July 31, 2026 20:55
183e79d to
0e06a46
Compare
jackpope
marked this pull request as ready for review
July 31, 2026 21:08
eps1lon
approved these changes
Jul 31, 2026
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 9, 2026 19:15
0e06a46 to
377f084
Compare
eps1lon
approved these changes
Aug 10, 2026
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 11, 2026 03:49
377f084 to
d550553
Compare
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 12, 2026 00:50
d550553 to
85a1474
Compare
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 12, 2026 01:05
85a1474 to
4b0a229
Compare
poteto
approved these changes
Aug 12, 2026
poteto
left a comment
Collaborator
There was a problem hiding this comment.
LGTM (light skim). Stacking stamps for the fragment-refs land sequence.
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 12, 2026 01:13
4b0a229 to
ba31100
Compare
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 12, 2026 01:19
ba31100 to
d3c60e9
Compare
Base automatically changed from
fragment-refs/text-child-event-listeners
to
main
August 12, 2026 01:25
dispatchEvent appends a temporary Text node to the fragment's nearest host parent, but a Document can't contain Text, so createRoot(document) threw HierarchyRequestError whenever the fragment had a listener or the event didn't bubble. Use a Comment node for Document containers: it is a legal document child and sits at the fragment's own position, unlike documentElement, which would put the target inside the fragment and fire its listeners twice.
jackpope
force-pushed
the
fragment-refs/dispatch-event-document-container
branch
from
August 12, 2026 01:25
d3c60e9 to
627d3c3
Compare
|
Comparing: 18c30e7...627d3c3 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
…7165) dispatchEvent appends a temporary Text node to the fragment's nearest host parent, but a Document can't contain Text, so createRoot(document) threw HierarchyRequestError whenever the fragment had a listener or the event didn't bubble. Use a Comment node for Document containers: it is a legal document child and sits at the fragment's own position, unlike documentElement, which would put the target inside the fragment and fire its listeners twice. DiffTrain build for [305feb9](305feb9)
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 12, 2026
…7165) dispatchEvent appends a temporary Text node to the fragment's nearest host parent, but a Document can't contain Text, so createRoot(document) threw HierarchyRequestError whenever the fragment had a listener or the event didn't bubble. Use a Comment node for Document containers: it is a legal document child and sits at the fragment's own position, unlike documentElement, which would put the target inside the fragment and fire its listeners twice. DiffTrain build for [305feb9](305feb9)
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.
dispatchEvent appends a temporary Text node to the fragment's nearest host parent, but a Document can't contain Text, so createRoot(document) threw HierarchyRequestError whenever the fragment had a listener or the event didn't bubble.
Use a Comment node for Document containers: it is a legal document child and sits at the fragment's own position, unlike documentElement, which would put the target inside the fragment and fire its listeners twice.