[DOM] Scope Fragment once listeners to the fragment, not each child - #37169
Merged
Conversation
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
from
July 31, 2026 19:15
9ca01df to
e22b430
Compare
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
from
July 31, 2026 20:15
e22b430 to
ac73de1
Compare
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
2 times, most recently
from
July 31, 2026 21:05
c3dbf25 to
793529c
Compare
jackpope
marked this pull request as ready for review
July 31, 2026 21:12
eps1lon
approved these changes
Jul 31, 2026
| } | ||
| case HostHoistable: | ||
| case HostComponent: { | ||
| // TODO: Enable HostText for RN |
Collaborator
There was a problem hiding this comment.
intentional? Probably worth mentioning why.
Collaborator
Author
There was a problem hiding this comment.
Ah yes, this was left over stale comment
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
from
August 9, 2026 19:15
793529c to
dcf4360
Compare
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
from
August 11, 2026 03:49
dcf4360 to
881c61e
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/once-listener-fragment-scope
branch
from
August 12, 2026 01:57
881c61e to
bcbcd2a
Compare
eps1lon
approved these changes
Aug 12, 2026
Base automatically changed from
fragment-refs/text-child-deletion-effects
to
main
August 13, 2026 03:17
{once: true} was forwarded to every host child, so each child could fire
independently and newly inserted children re-armed the listener from
_eventListeners. Wrap once listeners so the first fire removes them from
the fragment and all children.
Also, removes dead comment about HostText in RN.
jackpope
force-pushed
the
fragment-refs/once-listener-fragment-scope
branch
from
August 13, 2026 03:17
bcbcd2a to
8e9091c
Compare
|
Comparing: 9880384...8e9091c 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) |
eps1lon
approved these changes
Aug 13, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 13, 2026
…37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](beef6d6)
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 13, 2026
…37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](beef6d6)
github-actions Bot
pushed a commit
to code/lib-react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
github-actions Bot
pushed a commit
to code/lib-react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
github-actions Bot
pushed a commit
to xb18/react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
github-actions Bot
pushed a commit
to xb18/react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
github-actions Bot
pushed a commit
to HaroldHuanrongLIU/react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
github-actions Bot
pushed a commit
to HaroldHuanrongLIU/react
that referenced
this pull request
Aug 14, 2026
…eact#37169) `{once: true}` events are supposed to fire once. Since the `addEventListener` implementation adds a listener to each host child, `once` was not respected if you trigger event on multiple children. Here we wrap the event so we can remove is after the first call DiffTrain build for [beef6d6](react@beef6d6)
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.
{once: true}events are supposed to fire once. Since theaddEventListenerimplementation adds a listener to each host child,oncewas not respected if you trigger event on multiple children.Here we wrap the event so we can remove is after the first call