The element to start the traversal from.
The selector to match against.
OptionalminRoots: number = 0
The minimum number of roots to traverse before matching.
Optionalroots: number = 0
The number of roots already traversed.
The first matching element, or null if none was found.
Traverses the roots and returns the first match. The minRoots parameter indicates how many roots should be traversed before we started matching with the query.