suspend fun Window.awaitAnimationFrame(): Double

Suspends coroutine until next JS animation frame and returns frame time on resumption. The time is consistent with This function is cancellable. If the Job of the current coroutine is completed while this suspending function is waiting, this function immediately resumes with CancellationException.


Link copied to clipboard