MCPcopy Create free account
hub / github.com/angular/components / getHydrationState

Function getHydrationState

src/universal-app/hydration.e2e.spec.ts:36–54  ·  view source on GitHub ↗

Gets the hydration state from the current app.

()

Source from the content-addressed store, hash-verified

34
35 /** Gets the hydration state from the current app. */
36 async function getHydrationState() {
37 return wd.executeScript<{
38 hydratedComponents: number;
39 componentsSkippedHydration: number;
40 }>(() => {
41 const devModeWindow = window as Window &
42 typeof globalThis & {
43 ngDevMode: {
44 hydratedComponents: number;
45 componentsSkippedHydration: number;
46 };
47 };
48
49 return {
50 hydratedComponents: devModeWindow.ngDevMode.hydratedComponents,
51 componentsSkippedHydration: devModeWindow.ngDevMode.componentsSkippedHydration,
52 };
53 });
54 }
55});

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected