MCPcopy Create free account
hub / github.com/angular/angular / ɵɵdeferHydrateOnInteraction

Function ɵɵdeferHydrateOnInteraction

packages/core/src/defer/instructions.ts:734–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

732 * @codeGenApi
733 */
734export function ɵɵdeferHydrateOnInteraction() {
735 const lView = getLView();
736 const tNode = getCurrentTNode()!;
737
738 if (ngDevMode) {
739 trackTriggerForDebugging(lView[TVIEW], tNode, 'hydrate on interaction');
740 }
741
742 if (!shouldAttachTrigger(TriggerType.Hydrate, lView, tNode)) return;
743
744 const hydrateTriggers = getHydrateTriggers(getTView(), tNode);
745 hydrateTriggers.set(DeferBlockTrigger.Interaction, null);
746
747 if (typeof ngServerMode !== 'undefined' && ngServerMode) {
748 // We are on the server and SSR for defer blocks is enabled.
749 triggerDeferBlock(TriggerType.Hydrate, lView, tNode);
750 }
751 // The actual triggering of hydration on interaction is handled by JSAction in
752 // event_replay.ts.
753}
754
755/**
756 * Creates runtime data structures for the `on viewport` deferred trigger.

Callers

nothing calls this directly

Calls 8

getLViewFunction · 0.90
getCurrentTNodeFunction · 0.90
trackTriggerForDebuggingFunction · 0.90
shouldAttachTriggerFunction · 0.90
getHydrateTriggersFunction · 0.90
getTViewFunction · 0.90
triggerDeferBlockFunction · 0.90
setMethod · 0.65

Tested by

no test coverage detected