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

Fix mock-doc Node.contains implementation #3150

Merged

Conversation

kevinleedrum
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Unit tests (npm test) were run locally and passed
  • E2E Tests (npm run test.karma.prod) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

GitHub Issue Number: #3149

What is the new behavior?

The Node.contains method should return true if the passed node is the parent/context node. The wording in the spec is that it should return true if the passed node is an "inclusive descendant", which differs from a regular "descendant" in that it includes the object itself (not just the child nodes).

Does this introduce a breaking change?

  • Yes
  • No

Testing

Other information

The `Node.contains` method should return `true` if the passed node is the parent/context node.  [The wording in the spec](https://dom.spec.whatwg.org/#dom-node-contains) is that it should return `true` if the passed node is an "inclusive descendant", which differs from a regular "descendant" in that it includes the object itself (not just the child nodes).
@kevinleedrum kevinleedrum requested a review from a team November 19, 2021 18:49
@splitinfinities splitinfinities added the Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through. label Dec 2, 2021
Copy link
Member

@rwaskiewicz rwaskiewicz left a comment

Choose a reason for hiding this comment

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

Thanks! I had one small nitpick - but once that's resolved this should be good to go!

src/mock-doc/node.ts Outdated Show resolved Hide resolved
@rwaskiewicz rwaskiewicz added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label Dec 3, 2021
@rwaskiewicz rwaskiewicz merged commit f164407 into ionic-team:main Dec 3, 2021
@rwaskiewicz
Copy link
Member

Merged! Thanks again! 🙏

@ionitron-bot ionitron-bot bot added Reply Received and removed Awaiting Reply This PR or Issue needs a reply from the original reporter. labels Dec 3, 2021
@kevinleedrum kevinleedrum deleted the kevinleedrum-node-contains branch December 3, 2021 17:22
@rwaskiewicz rwaskiewicz added Resolution: Shipped and removed Resolution: Refine This PR is marked for Jira refinement. We're not working on it - we're talking it through. labels Dec 13, 2021
@rwaskiewicz
Copy link
Member

This fix has been included in the v2.12.0 release.

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.

3 participants