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 undefined | Element

  • Parameters

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

    Returns undefined | Element | Element[]