MCPcopy Create free account
hub / github.com/angular/angular / scheduleDeferBlockUpdate

Function scheduleDeferBlockUpdate

packages/core/src/defer/rendering.ts:398–414  ·  view source on GitHub ↗

* Schedules an update operation after a specified timeout.

(
  timeout: number,
  lDetails: LDeferBlockDetails,
  tNode: TNode,
  lContainer: LContainer,
  hostLView: LView<unknown>,
)

Source from the content-addressed store, hash-verified

396 * Schedules an update operation after a specified timeout.
397 */
398function scheduleDeferBlockUpdate(
399 timeout: number,
400 lDetails: LDeferBlockDetails,
401 tNode: TNode,
402 lContainer: LContainer,
403 hostLView: LView<unknown>,
404): VoidFunction {
405 const callback = () => {
406 const nextState = lDetails[NEXT_DEFER_BLOCK_STATE];
407 lDetails[STATE_IS_FROZEN_UNTIL] = null;
408 lDetails[NEXT_DEFER_BLOCK_STATE] = null;
409 if (nextState !== null) {
410 renderDeferBlockState(nextState, tNode, lContainer);
411 }
412 };
413 return scheduleTimerTrigger(timeout, callback, hostLView[INJECTOR]);
414}
415
416/**
417 * Checks whether we can transition to the next state.

Callers 1

Calls 1

scheduleTimerTriggerFunction · 0.90

Tested by

no test coverage detected