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

Function enableHydrationRuntimeSupport

packages/core/src/hydration/api.ts:99–111  ·  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

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

Callers 1

withDomHydrationFunction · 0.85

Tested by

no test coverage detected