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

Function executeDispatchesInOrder

code/communication/public/app.js:2175–2194  ·  view source on GitHub ↗

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

(event, simulated)

Source from the content-addressed store, hash-verified

2173 * Standard/simple iteration through an event's collected dispatches.
2174 */
2175function executeDispatchesInOrder(event, simulated) {
2176 var dispatchListeners = event._dispatchListeners;
2177 var dispatchInstances = event._dispatchInstances;
2178 {
2179 validateEventDispatches(event);
2180 }
2181 if (Array.isArray(dispatchListeners)) {
2182 for (var i = 0; i < dispatchListeners.length; i++) {
2183 if (event.isPropagationStopped()) {
2184 break;
2185 }
2186 // Listeners and Instances are two parallel arrays that are always in sync.
2187 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2188 }
2189 } else if (dispatchListeners) {
2190 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2191 }
2192 event._dispatchListeners = null;
2193 event._dispatchInstances = null;
2194}
2195
2196/**
2197 * @see executeDispatchesInOrderStopAtTrueImpl

Callers 1

Calls 1

executeDispatchFunction · 0.70

Tested by

no test coverage detected