@nexim/snackbar
Version:
Snackbar component with signal capability.
11 lines • 508 B
TypeScript
/**
* Waits for the next frame to ensure the DOM has been fully calculated.
* This minimizes the chance that querying the DOM will cause a costly reflow.
*
* This function uses `requestAnimationFrame` to schedule code to run immediately before the repaint,
* followed by `setTimeout` with a delay of 0 to execute code as soon as possible after the repaint.
*
* @see https://stackoverflow.com/a/47184426
*/
export declare function waitForNextFrame(): Promise<void>;
//# sourceMappingURL=utils.d.ts.map