Tool-Shack
    Preparing search index...

    Function waitForElement

    • Wait for an element matching selector to appear in the DOM

      Type Parameters

      • T extends HTMLElement = HTMLElement

      Parameters

      • selector: string

        CSS selector of the target element

      • timeout: number = 5000

        Timeout in milliseconds (default 5000)

      • parent: HTMLElement | Document = document

        Root element to observe (default document)

      Returns Promise<T>

      Promise resolving to the HTMLElement