question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for Element.closest()

See original GitHub issue

Hey folks, I was wondering whether there were plans to support Element.closest() in jsdom?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:16
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

32reactions
domeniccommented, Jul 7, 2016

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.

17reactions
timwiscommented, Jul 7, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found