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

Function accumulateDirectionalDispatches

code/styling/public/app.js:2670–2679  ·  view source on GitHub ↗

* Tags a `SyntheticEvent` with dispatched listeners. Creating this function * here, allows us to not have to bind or create functions for each event. * Mutating the event's members allows us to not have to create a wrapping * "dispatch" object that pairs the event with the listener.

(inst, phase, event)

Source from the content-addressed store, hash-verified

2668 * "dispatch" object that pairs the event with the listener.
2669 */
2670function accumulateDirectionalDispatches(inst, phase, event) {
2671 {
2672 warning(inst, 'Dispatching inst must not be null');
2673 }
2674 var listener = listenerAtPhase(inst, event, phase);
2675 if (listener) {
2676 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
2677 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
2678 }
2679}
2680
2681/**
2682 * Collect dispatches (must be entirely collected before dispatching - see unit

Callers

nothing calls this directly

Calls 3

warningFunction · 0.85
listenerAtPhaseFunction · 0.70
accumulateIntoFunction · 0.70

Tested by

no test coverage detected