requestIdleCallback

external fun requestIdleCallback(callback: IdleRequestCallback, options: IdleRequestOptions? = definedExternally): IdleRequestId(source)

MDN Reference