Returns the first ancestor that matches the specified selector. This function treates the host of a shadow root as its parent.
Copy
Returns the first ancestor that matches the specified selector. This function treates the host of a shadow root as its parent.