Function selectParent

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

    Parameters

    • element: Element
    • selector: string

    Returns Element

    Example