MCPcopy Index your code
hub / github.com/angular/angular / sharedStashFunction

Function sharedStashFunction

packages/core/src/event_delegation_utils.ts:52–59  ·  view source on GitHub ↗
(rEl: RElement, eventType: string, listenerFn: Function)

Source from the content-addressed store, hash-verified

50}
51
52export const sharedStashFunction = (rEl: RElement, eventType: string, listenerFn: Function) => {
53 const el = rEl as unknown as Element;
54 const eventListenerMap = el.__jsaction_fns ?? new Map();
55 const eventListeners = eventListenerMap.get(eventType) ?? [];
56 eventListeners.push(listenerFn);
57 eventListenerMap.set(eventType, eventListeners);
58 el.__jsaction_fns = eventListenerMap;
59};
60
61export const sharedMapFunction = (rEl: RElement, jsActionMap: Map<string, Set<Element>>) => {
62 const el = rEl as unknown as Element;

Callers 1

withEventReplayFunction · 0.90

Calls 3

getMethod · 0.65
setMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…