Element.closest

Returns itself or the closest parent that matches the given selector, or null if none found

class Element
@scriptable
closest
(
string selector
)

See Also

Suggestion Box / Bug Report