mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
This commit is contained in:
parent
83ffa94783
commit
69e0aa56f1
1 changed files with 4 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ import {
|
|||
invokeRegisteredListeners,
|
||||
} from '../event_delegation_utils';
|
||||
import {APP_ID} from '../application/application_tokens';
|
||||
import {performanceMarkFeature} from '../util/performance';
|
||||
|
||||
declare global {
|
||||
var ngContracts: {[key: string]: EarlyJsactionDataContainer};
|
||||
|
|
@ -81,6 +82,9 @@ export function withEventReplay(): Provider[] {
|
|||
const appId = inject(APP_ID);
|
||||
isEnabled = !!globalThis[CONTRACT_PROPERTY]?.[appId];
|
||||
}
|
||||
if (isEnabled) {
|
||||
performanceMarkFeature('NgEventReplay');
|
||||
}
|
||||
return isEnabled;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue