(node: RNode, checkIfAlreadyClaimed = true)
| 329 | * the hydration process handled all nodes. |
| 330 | */ |
| 331 | export 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 | |
| 345 | export function markRNodeAsSkippedByHydration(node: RNode) { |
| 346 | if (!ngDevMode) { |
no test coverage detected