Skip to content
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

Define ParentNode#replaceChildren #851

Merged
merged 2 commits into from
Apr 20, 2020

Conversation

saschanaz
Copy link
Member

@saschanaz saschanaz commented Mar 29, 2020

@annevk
Copy link
Member

annevk commented Mar 30, 2020

Thanks @saschanaz! This change looks good to me.

Support: I think Firefox and Safari can be considered to be supportive. @mfreed7 thoughts for Chrome?

@annevk annevk added the needs tests Moving the issue forward requires someone to write tests label Mar 30, 2020
@annevk
Copy link
Member

annevk commented Apr 1, 2020

@domenic @TimothyGu any interest in writing a jsdom implementation? I wonder if we should start "soft" requiring that for additions to the DOM Standard to add another layer of certainty with regards to the algorithms.

@mfreed7
Copy link
Contributor

mfreed7 commented Apr 2, 2020

Sounds like a reasonable proposal to me. I've created a Chromium bug: https://crbug.com/1067384

I honestly don't know how we go about establishing "official support" from Chromium, but I'm at least personally supportive. The use case seems clear and the implementation sounds straightforward.

@mfreed7
Copy link
Contributor

mfreed7 commented Apr 10, 2020

FYI, Chromium plans to try to get this implemented in Q2.

@annevk annevk force-pushed the parentnode-replacechildren branch from b38a543 to 4a6493b Compare April 15, 2020 12:22
Copy link
Collaborator

@smaug---- smaug---- left a comment

Choose a reason for hiding this comment

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

Ah, the spec already has nice helper algorithms for this.

@annevk annevk merged commit 3a11492 into whatwg:master Apr 20, 2020
@annevk
Copy link
Member

annevk commented Apr 20, 2020

Thanks @saschanaz for writing all the tests and the change to the DOM Standard and Olli for reviewing! Great work.

@saschanaz saschanaz deleted the parentnode-replacechildren branch April 20, 2020 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs tests Moving the issue forward requires someone to write tests
Development

Successfully merging this pull request may close these issues.

Proposal: ParentNode.replaceAll() / ParentNode.replaceChildren()
4 participants