MCPcopy
hub / github.com/angular/angular / markRNodeAsClaimedByHydration

Function markRNodeAsClaimedByHydration

packages/core/src/hydration/utils.ts:330–342  ·  view source on GitHub ↗
(node: RNode, checkIfAlreadyClaimed = true)

Source from the content-addressed store, hash-verified

328 * the hydration process handled all nodes.
329 */
330export function markRNodeAsClaimedByHydration(node: RNode, checkIfAlreadyClaimed = true) {
331 if (!ngDevMode) {
332 throw new Error(
333 'Calling `markRNodeAsClaimedByHydration` in prod mode ' +
334 'is not supported and likely a mistake.',
335 );
336 }
337 if (checkIfAlreadyClaimed && isRNodeClaimedForHydration(node)) {
338 throw new Error('Trying to claim a node, which was claimed already.');
339 }
340 patchHydrationInfo(node, {status: HydrationStatus.Hydrated});
341 ngDevMode.hydratedNodes++;
342}
343
344export function markRNodeAsSkippedByHydration(node: RNode) {
345 if (!ngDevMode) {

Calls 2

patchHydrationInfoFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…