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

Function enableHydrationRuntimeSupport

packages/core/src/hydration/api.ts:98–110  ·  view source on GitHub ↗

* Brings the necessary hydration code in tree-shakable manner. * The code is only present when the `provideClientHydration` is * invoked. Otherwise, this code is tree-shaken away during the * build optimization step. * * This technique allows us to swap implementations of methods so * tree sha

()

Source from the content-addressed store, hash-verified

96 * supports hydration only when enabled.
97 */
98function enableHydrationRuntimeSupport() {
99 if (!isHydrationSupportEnabled) {
100 isHydrationSupportEnabled = true;
101 enableRetrieveHydrationInfoImpl();
102 enableLocateOrCreateElementNodeImpl();
103 enableLocateOrCreateTextNodeImpl();
104 enableLocateOrCreateElementContainerNodeImpl();
105 enableLocateOrCreateContainerAnchorImpl();
106 enableLocateOrCreateContainerRefImpl();
107 enableFindMatchingDehydratedViewImpl();
108 enableApplyRootElementTransformImpl();
109 }
110}
111
112/**
113 * Brings the necessary i18n hydration code in tree-shakable manner.

Callers 1

withDomHydrationFunction · 0.85

Tested by

no test coverage detected