-
As mentioned in the docs, selectors may match the current element or any of its children. Is there a simple (or recommended) way to only match children? At the moment I'm filtering out the current element if it was matched node.getElementsByTag("table").stream().filter(x -> x != node).toList(); |
Beta Was this translation helpful? Give feedback.
Answered by
jhy
Dec 19, 2024
Replies: 1 comment 1 reply
-
Hi, There are a few ways to do this. The cleanest syntax might be to select on the element's
Or, modify the selector to only match the children directly:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
midgleyc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
There are a few ways to do this. The cleanest syntax might be to select on the element's
children()
:Or, modify the selector to only match the children directly: