Function queryThroughShadow

Perform .querySelector() on the given element with support for elements that contain an open Shadow Root.

  • Parameters

    • element: Element | ShadowRoot
    • query: string | { tagName: string }
    • options: { all: true }

    Returns Element[]

  • Parameters

    • element: Element | ShadowRoot
    • query: string | { tagName: string }
    • Optionaloptions: { all?: false }

    Returns Element | undefined

  • Parameters

    • element: Element | ShadowRoot
    • query: string | { tagName: string }
    • Optionaloptions: PartialWithUndefined<{ all: boolean }>

    Returns Element | Element[] | undefined