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

Function executeDispatchesInOrder

code/styling/public/app.js:2140–2159  ·  view source on GitHub ↗

* Standard/simple iteration through an event's collected dispatches.

(event, simulated)

Source from the content-addressed store, hash-verified

2138 * Standard/simple iteration through an event's collected dispatches.
2139 */
2140function executeDispatchesInOrder(event, simulated) {
2141 var dispatchListeners = event._dispatchListeners;
2142 var dispatchInstances = event._dispatchInstances;
2143 {
2144 validateEventDispatches(event);
2145 }
2146 if (Array.isArray(dispatchListeners)) {
2147 for (var i = 0; i < dispatchListeners.length; i++) {
2148 if (event.isPropagationStopped()) {
2149 break;
2150 }
2151 // Listeners and Instances are two parallel arrays that are always in sync.
2152 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2153 }
2154 } else if (dispatchListeners) {
2155 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2156 }
2157 event._dispatchListeners = null;
2158 event._dispatchInstances = null;
2159}
2160
2161/**
2162 * @see executeDispatchesInOrderStopAtTrueImpl

Callers 1

Calls 1

executeDispatchFunction · 0.70

Tested by

no test coverage detected