angular/packages/platform-server
Andrew Kushnir 596b43d631 refactor(core): skip disconnected nodes while computing node path for hydration (#53317)
In certain cases Angular hydration logic can not rely on the order in which elements are present in a template (for example, in content-projection use-cases) and there is a need to serialize a path from one node to another, so that hydration can locate an element on a page. The logic attempts to use an immediate parent element as an anchor and compute the path from it. If it fails - the path is computed starting from the <body> (this is a fallback).

This commit updates the logic to walk up the parents tree if an immediate parent (from a template) is disconnected from the DOM. This helps to shorten the lookup path and make it more stable.

PR Close #53317
2023-12-04 21:44:08 -08:00
..
init refactor(platform-server): replace global usages with globalThis (#52342) 2023-10-24 09:26:50 -07:00
src refactor(platform-server): replace global usages with globalThis (#52342) 2023-10-24 09:26:50 -07:00
test refactor(core): skip disconnected nodes while computing node path for hydration (#53317) 2023-12-04 21:44:08 -08:00
testing build: add targets for api doc generation (#52034) 2023-10-10 16:18:50 -07:00
BUILD.bazel refactor(platform-server): remove dependency between @angular/platform-server and @angular/platform-server/init (#52342) 2023-10-24 09:26:50 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: update node.js engines version to be more explicate about v20 support (#52448) 2023-10-31 14:18:36 -07:00
PACKAGE.md docs: update SSR doc to reflect version 17 (#52398) 2023-10-26 12:30:59 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00