mirror of
https://github.com/yudai/gotty.git
synced 2026-01-07 18:18:50 +01:00
10 lines
429 B
TypeScript
10 lines
429 B
TypeScript
|
|
/**
|
||
|
|
* Waits for a DOM element matching the selector to exist in the document.
|
||
|
|
* Resolves immediately if it already exists.
|
||
|
|
*
|
||
|
|
* @param selector CSS selector for the element to wait for
|
||
|
|
* @param timeout Optional timeout in milliseconds (default: no timeout)
|
||
|
|
* @returns Promise that resolves with the found element
|
||
|
|
*/
|
||
|
|
export declare function waitForElement<T extends Element>(selector: string, timeout?: number): Promise<T>;
|