Extensions for org.w3c.dom.Window
fun Window.asCoroutineDispatcher(): CoroutineDispatcher Converts an instance of Window to an implementation of CoroutineDispatcher. |
|
Suspends coroutine until next JS animation frame and returns frame time on resumption. The time is consistent with window.performance.now(). 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. |