Component closest method #5218
Baghunts
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
@Baghunts Hello, Thanks for the highlight. Will this change improve performance to traverse the DOM? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For finding some closest element by selector, we can use the
closest
method, which in your turn, uses jQuery's closest method.jQuery's closest method also returns the element self too. I think it will be great to use the
parents
method insteadclosest
, for skipping the element from the searchBeta Was this translation helpful? Give feedback.
All reactions