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

Function markRNodeAsClaimedByHydration

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

Source from the content-addressed store, hash-verified

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

Calls 2

patchHydrationInfoFunction · 0.85

Tested by

no test coverage detected