Skip to content

Commit 69e0aa5

Browse files
committed
refactor(core): use performance API for Event Replay (#56509)
This commit adds a standard performance marker that can be viewed in Chrome dev tools and other tooling. See more info at https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark PR Close #56509
1 parent 83ffa94 commit 69e0aa5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/core/src/hydration/event_replay.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
invokeRegisteredListeners,
3939
} from '../event_delegation_utils';
4040
import {APP_ID} from '../application/application_tokens';
41+
import {performanceMarkFeature} from '../util/performance';
4142

4243
declare global {
4344
var ngContracts: {[key: string]: EarlyJsactionDataContainer};
@@ -81,6 +82,9 @@ export function withEventReplay(): Provider[] {
8182
const appId = inject(APP_ID);
8283
isEnabled = !!globalThis[CONTRACT_PROPERTY]?.[appId];
8384
}
85+
if (isEnabled) {
86+
performanceMarkFeature('NgEventReplay');
87+
}
8488
return isEnabled;
8589
},
8690
},

0 commit comments

Comments
 (0)