Skip to content

Add matches and closest functions to Web.DOM.Element. #4

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

utkarshkukreti
Copy link

Hi @garyb, these functions are documented here:

  1. https://developer.mozilla.org/en-US/docs/Web/API/Element/matches
  2. https://developer.mozilla.org/en-US/docs/Web/API/Element/closest

closest is marked as "experimental" but it's present in the DOM Living Standard.

I'm not sure what your policy is on functions not supported by all browsers but I needed this in something I'm working on so I thought I'd send a PR for you to review.

@utkarshkukreti utkarshkukreti force-pushed the element-matches-and-closest branch from 89f9975 to 6e072d7 Compare August 21, 2018 11:46
@garyb
Copy link
Member

garyb commented Sep 2, 2018

Hey, thanks for the PR and sorry about the slow reply!

I was intending on sticking to the W3C HTML 5 specs for these libraries rather than the living standard - it's a bit conservative for the most part, but it hopefully means there's less of a chance of cross-browser compatibility issues with these libraries.

@utkarshkukreti
Copy link
Author

Ah ok. I'll just put these in a js file in my project.

sigma-andex pushed a commit to working-group-purescript-es/purescript-web-dom that referenced this pull request Apr 14, 2022
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