FluentUI Compat

Home > @cascadiacollections/fluentui-compat > Async > setImmediate

Async.setImmediate() method

Optimized setImmediate implementation that uses setTimeout(0) with window caching.

Provides cross-browser compatibility for immediate execution scheduling.

Signature:

setImmediate(callback: () => void, targetElement?: Element | null): number;

Parameters

Parameter

Type

Description

callback

() => void

Function to execute immediately

targetElement

Element | null

(Optional) Optional element to determine window context

Returns:

number

Timer ID for the immediate execution

  • Edit this page
In this article
Back to top FluentUI React complimentary components and utilities focused on render performance