Package-level declarations

Types

Link copied to clipboard

The IdleDeadline interface is used as the data type of the input parameter to idle callbacks established by calling Window.requestIdleCallback().

Link copied to clipboard
typealias IdleRequestCallback = (deadline: IdleDeadline) -> Unit
Link copied to clipboard
sealed interface IdleRequestId
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun awaitIdleCallback(options: IdleRequestOptions? = null): IdleDeadline
Link copied to clipboard

The window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().

Link copied to clipboard
external fun requestIdleCallback(callback: IdleRequestCallback, options: IdleRequestOptions? = definedExternally): IdleRequestId

The window.requestIdleCallback() method queues a function to be called during a browser's idle periods.