Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/internal/test/wait-for-scrolling.d.ts
2024-09-05 00:39:25 -04:00

9 lines
534 B
TypeScript
Executable file

/**
* Wait until an element has stopped scrolling
* This considers the element to have stopped scrolling, as soon as it did not change its
* scroll position for 20 successive animation frames
* @param {HTMLElement} element - The element which is scrolled
* @param {numeric} timeoutInMs - A timeout in ms. If the timeout has elapsed, the promise rejects
* @returns A promise which resolves after the scrolling has stopped
*/
export declare const waitForScrollingToEnd: (element: Element, timeoutInMs?: number) => Promise<void>;