Skip to content

ComponentEx.getInFlightLoadPromise method

ComponentEx › getInFlightLoadPromise

Returns the component's in-flight load Promise (its onloadAsync plus children), or null when nothing is loading — either the component loaded fully synchronously or its async load has already settled.

Lets a caller scheduled while the component is still loading await the async load tail before acting, instead of racing it: Component.onload has run (so _loaded is set) but onloadAsync may not have finished.

It covers this component's OWN load only. A caller that also depends on a sibling's state — a layout-ready handler reading settings is the common one — wants getInFlightAncestryLoadPromise, which LayoutReadyComponent uses.

Signature:

getInFlightLoadPromise(): null | Promise<void>

Returns: null | Promise<void> — The in-flight load promise, or null if no load is in flight.