Skip to content

Handle appendAllChildren mutating the list of children#1969

Merged
karlseguin merged 1 commit intomainfrom
fix_append_child_crash
Mar 23, 2026
Merged

Handle appendAllChildren mutating the list of children#1969
karlseguin merged 1 commit intomainfrom
fix_append_child_crash

Conversation

@karlseguin
Copy link
Collaborator

appendAllChildren iterates through the children, but when a child is appended it can mutate the DOM (only via a custom element connected callback AFAIK) which can render the iterator invalid. Constantly get parent.firstChild() as the target.

`appendAllChildren` iterates through the children, but when a child is appended
it can mutate the DOM (only via a custom element connected callback AFAIK) which
can render the iterator invalid. Constantly get parent.firstChild() as the
target.
@karlseguin karlseguin merged commit 5c79961 into main Mar 23, 2026
12 checks passed
@karlseguin karlseguin deleted the fix_append_child_crash branch March 23, 2026 23:29
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants