mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): Use ActionResolver in Dispatcher. (#56369)
`EventContract` usages in Angular now use `false` for `useActionResolver`. Tests have been updated, with functionality that depends on `ActionResolver` moving to dispatcher_test.ts. PR Close #56369
This commit is contained in:
parent
be09f0b3cb
commit
247dce0023
6 changed files with 882 additions and 1016 deletions
|
|
@ -25,7 +25,7 @@ export interface EarlyJsactionDataContainer {
|
|||
|
||||
// @public
|
||||
export class EventContract implements UnrenamedEventContract {
|
||||
constructor(containerManager: EventContractContainerManager, useActionResolver?: boolean);
|
||||
constructor(containerManager: EventContractContainerManager, useActionResolver: false);
|
||||
// (undocumented)
|
||||
static A11Y_CLICK_SUPPORT: boolean;
|
||||
addA11yClickSupport(): void;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ export class EventContract implements UnrenamedEventContract {
|
|||
|
||||
constructor(
|
||||
containerManager: EventContractContainerManager,
|
||||
private readonly useActionResolver = true,
|
||||
private readonly useActionResolver: false,
|
||||
) {
|
||||
this.containerManager = containerManager;
|
||||
if (this.useActionResolver) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -78,7 +78,10 @@ export const initGlobalEventDelegation = (
|
|||
if (injector.get(IS_EVENT_REPLAY_ENABLED, EVENT_REPLAY_ENABLED_DEFAULT)) {
|
||||
return;
|
||||
}
|
||||
eventDelegation.eventContract = new EventContract(new EventContractContainer(document.body));
|
||||
eventDelegation.eventContract = new EventContract(
|
||||
new EventContractContainer(document.body),
|
||||
/* useActionResolver= */ false,
|
||||
);
|
||||
const dispatcher = new EventDispatcher(invokeRegisteredListeners);
|
||||
registerDispatcher(eventDelegation.eventContract, dispatcher);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ const initEventReplay = (eventDelegation: GlobalEventDelegation, injector: Injec
|
|||
const earlyJsactionData = getJsactionData(container)!;
|
||||
const eventContract = (eventDelegation.eventContract = new EventContract(
|
||||
new EventContractContainer(earlyJsactionData.c),
|
||||
/* useActionResolver= */ false,
|
||||
));
|
||||
for (const et of earlyJsactionData.et) {
|
||||
eventContract.addEvent(et);
|
||||
|
|
|
|||
Loading…
Reference in a new issue