angular/packages/core/src/hydration
arturovt 624be2ef0c fix(core): prevent stash listener conflicts (#59635)
The stash event listener is a global function that might be unsafely overridden if multiple microfrontend applications exist on the page.

In this commit, we create a map of `APP_ID` to stash event listener functions. This map prevents conflicts because multiple applications might be bootstrapped simultaneously on the client (one rendered on the server and one rendering only on the client).

I.e., the code that might be used is:

```ts
// Given that `app-root` is rendered on the server
bootstrapApplication(AppComponent, appConfig);

bootstrapApplication(BlogRootComponent, appBlogConfig);
```

Two bootstrapped applications would conflict and override each other's code.

PR Close #59635
2025-04-30 08:53:06 -07:00
..
annotate.ts refactor(core): do not serialize parent block id for top level blocks (#59190) 2025-01-14 11:06:58 -05:00
api.ts feat(core): stabilize incremental hydration api (#60888) 2025-04-16 13:00:44 -04:00
cleanup.ts refactor(core): clean up when blocks fail to fetch or hydrate (#59740) 2025-02-21 11:08:03 -05:00
compression.ts refactor(core): tree-shake REF_EXTRACTOR_REGEXP (#60081) 2025-02-26 11:17:48 -05:00
error_handling.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
event_replay.ts fix(core): prevent stash listener conflicts (#59635) 2025-04-30 08:53:06 -07:00
i18n.ts refactor(core): move DOM manipulation logic to its own file (#59462) 2025-01-16 10:38:44 -08:00
interfaces.ts refactor(core): do not serialize parent block id for top level blocks (#59190) 2025-01-14 11:06:58 -05:00
node_lookup_utils.ts refactor(core): change node navigation step to plain const (#59469) 2025-01-13 11:12:47 -05:00
skip_hydration.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
tokens.ts refactor(core): Eliminate recursion in incremental hydration (#58419) 2024-10-31 11:22:58 +01:00
utils.ts feat(devtools): defer blocks support (#60629) 2025-04-29 22:07:47 -07:00
views.ts fix(core): fixes timing of hydration cleanup on control flow (#60425) 2025-03-21 14:45:23 -07:00