Skip to content

Element#remove Polyfill#1524

Open
johnzhou721 wants to merge 9 commits intozloirock:masterfrom
johnzhou721:element-remove
Open

Element#remove Polyfill#1524
johnzhou721 wants to merge 9 commits intozloirock:masterfrom
johnzhou721:element-remove

Conversation

@johnzhou721
Copy link
Contributor

@johnzhou721 johnzhou721 commented Mar 18, 2026

@zloirock Please take a look when you have time — thanks.

There's some other things with ChildNode mixin that have methods like remove, however I think they should be in separate modules; I may submit a PR with these later

Refs #1456.

TODO:

  • Test invalid this
  • Document

commit 58c381424d96a23c31c34aecf0aca41d73f6b148
Merge: f7a9c9c 505440c
Author: John Zhou <john-xyz@outlook.com>
Date:   Tue Mar 17 20:23:09 2026 -0500

    Merge remote-tracking branch 'origin' into element-remove

commit f7a9c9c
Author: John Zhou <john-xyz@outlook.com>
Date:   Tue Mar 17 20:19:38 2026 -0500

    Fixes

commit 3c5a6e3
Author: John Zhou <john-xyz@outlook.com>
Date:   Tue Mar 17 18:06:23 2026 -0500

    Element#remove polyfill
@johnzhou721
Copy link
Contributor Author

@zloirock Can you rerun Karma? It seems intermittent.

@johnzhou721 johnzhou721 marked this pull request as draft March 18, 2026 01:36
@johnzhou721 johnzhou721 marked this pull request as ready for review March 19, 2026 03:38
@johnzhou721
Copy link
Contributor Author

@zloirock Take a look at this whenever you're ready -- sorry for the premature request for review.

I've been holding off on implementing the same method for DocumentType etc. because I don't have so much time to create files, so only the Element polyfill for now.

Copy link
Owner

@zloirock zloirock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this is a good idea to add it right now. Now core-js contains only ES and cross-platform features; DOM elements are not cross-platform. There are many things to consider. Will see.

@johnzhou721 johnzhou721 requested a review from zloirock March 19, 2026 14:25
@johnzhou721
Copy link
Contributor Author

@zloirock If yo consider this to be good for core-js, then please consider merging it. If not, feel free to close.

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.

2 participants