MCPcopy Index your code
hub / github.com/angular/angular / skipSiblingNodes

Function skipSiblingNodes

packages/core/src/hydration/i18n.ts:388–397  ·  view source on GitHub ↗

* Skip over some sibling nodes during hydration. * * Note: we use this instead of `siblingAfter` as it's expected that * sometimes we might encounter null nodes. In those cases, we want to * defer to downstream error handling to provide proper context.

(state: I18nHydrationState, skip: number)

Source from the content-addressed store, hash-verified

386 * defer to downstream error handling to provide proper context.
387 */
388function skipSiblingNodes(state: I18nHydrationState, skip: number) {
389 let currentNode = state.currentNode;
390 for (let i = 0; i < skip; i++) {
391 if (!currentNode) {
392 break;
393 }
394 currentNode = currentNode?.nextSibling ?? null;
395 }
396 return currentNode;
397}
398
399/**
400 * Fork the given state into a new state for hydrating children.

Callers 1

collectI18nNodesFromDomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…