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

Add tests for ParentNode#replaceChildren #22524

Merged
merged 7 commits into from
Apr 20, 2020
Merged

Conversation

saschanaz
Copy link
Member

Relates to whatwg/dom#478 and whatwg/dom#851.

Closes #21810

@saschanaz saschanaz requested a review from annevk March 30, 2020 10:41
@wpt-pr-bot wpt-pr-bot added the dom label Mar 30, 2020
@wpt-pr-bot wpt-pr-bot requested review from jdm and zqzhang March 30, 2020 10:41
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-22524 March 30, 2020 10:47 Inactive
@annevk
Copy link
Member

annevk commented Apr 1, 2020

This looks like a good start. We should probably have some tests covering mutation observers as well. And maybe with nodes moving between documents.

@saschanaz
Copy link
Member Author

saschanaz commented Apr 1, 2020

We should probably have some tests covering mutation observers as well. And maybe with nodes moving between documents.

Should I add same tests for .append and .prepend too? I might create a new dedicated test file for hierarchy checks if then.

@annevk
Copy link
Member

annevk commented Apr 1, 2020

Yeah, that might be good if they don't have any. Also, feel free to use const wherever possible. Bit easier to read than var.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-22524 April 1, 2020 20:54 Inactive
@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-22524 April 10, 2020 18:46 Inactive
@annevk
Copy link
Member

annevk commented Apr 15, 2020

Are you planning on testing mutation observers doing the right thing in this PR? Or do that separately?

@saschanaz
Copy link
Member Author

Are you planning on testing mutation observers doing the right thing in this PR? Or do that separately?

Oops, I forgot that 🤦‍♀️ I'll try that here.

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-22524 April 15, 2020 19:21 Inactive
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

@smaug---- can you take a second look?

<script src="/resources/testharnessreport.js"></script>
<script src="pre-insertion-validation-hierarchy.js"></script>
<script>
Node.prototype.replaceChildren = function (...args) {
Copy link
Member

Choose a reason for hiding this comment

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

I suspect you meant to remove this, right?

@wpt-pr-bot wpt-pr-bot temporarily deployed to wpt-preview-22524 April 20, 2020 10:13 Inactive
@saschanaz saschanaz merged commit b4c5887 into master Apr 20, 2020
@saschanaz saschanaz deleted the parentnode-replacechildren branch April 20, 2020 15:35
annevk pushed a commit to whatwg/dom that referenced this pull request Apr 20, 2020
mfreed7 pushed a commit to mfreed7/dom that referenced this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants