• Uses a MutationObserver to wait for an HTMLElement inside another HTMLElement. Timeouts after 2s by default, at which point there's probably a deeper problem going on.

    Type Parameters

    • T extends HTMLElement

    Parameters

    • container: Element

      The container to observe and find the HTMLElement in

    • selector: string

      The argument for container.querySelector<T>(selector)

    • ms: number = 2000

    Returns Promise<T | null>

    The first element that is a descendant of container that matches selector or null after the timeout delay.