ElementGetClosest Op
get the closest parent element matching the query selector
get the closest parent element matching the query selector
Summary (oneliner)
Traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS selector.
Full Name
- Ops.Html.ElementGetClosest
- Core Op - visible for everyone
- MIT
- Jan 30, 2025 at 18:53
Documentation (markdown)
Issues
Example patch id
Youtube ids (comma seperated)
Op Licence
Caniuse query
Example Patch ElementGetClosest Example
INPUT PORTS
HTML Element (Object:element)
input element
Query (String)
css selector
OUTPUT PORTS
Element (Object)
closest element