You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/browser/dom/element.zig
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,30 @@ pub const Element = struct {
135
135
}
136
136
}
137
137
138
+
// The closest() method of the Element interface traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS selector.
139
+
// Returns the closest ancestor Element or itself, which matches the selectors. If there are no such element, null.
0 commit comments