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

Function executeDispatchesInOrder

code/composition/public/app.js:2278–2297  ·  view source on GitHub ↗

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

(event, simulated)

Source from the content-addressed store, hash-verified

2276 * Standard/simple iteration through an event's collected dispatches.
2277 */
2278function executeDispatchesInOrder(event, simulated) {
2279 var dispatchListeners = event._dispatchListeners;
2280 var dispatchInstances = event._dispatchInstances;
2281 {
2282 validateEventDispatches(event);
2283 }
2284 if (Array.isArray(dispatchListeners)) {
2285 for (var i = 0; i < dispatchListeners.length; i++) {
2286 if (event.isPropagationStopped()) {
2287 break;
2288 }
2289 // Listeners and Instances are two parallel arrays that are always in sync.
2290 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2291 }
2292 } else if (dispatchListeners) {
2293 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2294 }
2295 event._dispatchListeners = null;
2296 event._dispatchInstances = null;
2297}
2298
2299/**
2300 * @see executeDispatchesInOrderStopAtTrueImpl

Callers 1

Calls 1

executeDispatchFunction · 0.70

Tested by

no test coverage detected