MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / accumulateDispatches

Function accumulateDispatches

code/styling/public/app.js:2710–2719  ·  view source on GitHub ↗

* Accumulates without regard to direction, does not look for phased * registration names. Same as `accumulateDirectDispatchesSingle` but without * requiring that the `dispatchMarker` be the same as the dispatched ID.

(inst, ignoredDirection, event)

Source from the content-addressed store, hash-verified

2708 * requiring that the `dispatchMarker` be the same as the dispatched ID.
2709 */
2710function accumulateDispatches(inst, ignoredDirection, event) {
2711 if (inst && event && event.dispatchConfig.registrationName) {
2712 var registrationName = event.dispatchConfig.registrationName;
2713 var listener = getListener(inst, registrationName);
2714 if (listener) {
2715 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
2716 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
2717 }
2718 }
2719}
2720
2721/**
2722 * Accumulates dispatches on an `SyntheticEvent`, but only for the

Callers 1

Calls 2

getListenerFunction · 0.70
accumulateIntoFunction · 0.70

Tested by

no test coverage detected