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