Support for Element.closest()
See original GitHub issueHey folks, I was wondering whether there were plans to support Element.closest()
in jsdom?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:16
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Element.closest() - Web APIs - MDN Web Docs
The closest() method of the Element interface traverses the element and its parents (heading toward the document root) until it finds a node ......
Read more >HTML DOM Element closest() Method - W3Schools
The closest() method searches up the DOM tree for elements which matches a specified CSS selector. The closest() method starts at the element...
Read more >element-closest - npm
The #Element. closest method returns the closest element that matches a selector. It returns the element itself, one of its ancestor, or null ......
Read more >.closest() | jQuery API Documentation
This will change the color of list item A. The .closest() method begins its search with the element itself before progressing up the...
Read more >Practical Use Cases for JavaScript's closest() Method
Element.closest() allows us to traverse up the DOM until we get an element that matches the given selector. The awesomeness is that we...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No plans to support the non-existent Element.closest. Element.prototype.closest, however, we might try to support in the future. A pull request would be the best way to get work on that moving forward.
Oh, okay. I’m sure you didn’t mean it, but your initial response made me feel like a noob for not knowing the difference, and I hope that’s not representative of this community. I’ll try to dive into the jsdom code to see whether I understand enough to contribute.