-
Notifications
You must be signed in to change notification settings - Fork 27k
refactor(core): replace usages of removeChild #57203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a19a358 to
8457281
Compare
|
Mostly passing TGP, aside from one unrelated failure and one that I'll clean up before we submit. |
josephperrott
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewed-for: fw-security
alxhub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: global-approvers
|
Will run another TGP just in case. |
These changes replace most usages of `removeChild` with `remove`. The latter has the advantage of not having to look up the `parentNode` and ensure that the child being removed actually belongs to the specific parent. The refactor should be fairly safe since all the browsers we cover support `remove`. [Something similar was done in Components](angular/components#23592) some time ago and there haven't been any bug reports as a result.
8457281 to
108356b
Compare
These changes replace most usages of `removeChild` with `remove`. The latter has the advantage of not having to look up the `parentNode` and ensure that the child being removed actually belongs to the specific parent. The refactor should be fairly safe since all the browsers we cover support `remove`. [Something similar was done in Components](angular/components#23592) some time ago and there haven't been any bug reports as a result. PR Close #57203
|
This PR was merged into the repository by commit 513a4fe. The changes were merged into the following branches: main, 18.1.x |
This was affected by a recent change in Angular upstream that Angular core decides to use `element.remove()` instead of `parent.removeChild(element)`. Hence, during the unmount phase, the `parent` is never calculated and passed in. angular/angular#57203
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
These changes replace most usages of
removeChildwithremove. The latter has the advantage of not having to look up theparentNodeand ensure that the child being removed actually belongs to the specific parent.The refactor should be fairly safe since all the browsers we cover support
remove. Something similar was done in Components some time ago and there haven't been any bug reports as a result.