closest method
closest
Returns the closest ancestor element (or the element itself) that matches the specified CSS selector.
Returns
The closest matching element; otherwise, null.
def closest(self, selector):
...
| Parameter | Type | Description |
|---|---|---|
| selector | str | The selector. |
See Also
- module
aspose.html - class
Element - class
HTMLObjectElement