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

Function executeDispatchesInOrder

code/third-party/public/app.js:1373–1392  ·  view source on GitHub ↗

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

(event, simulated)

Source from the content-addressed store, hash-verified

1371 * Standard/simple iteration through an event's collected dispatches.
1372 */
1373function executeDispatchesInOrder(event, simulated) {
1374 var dispatchListeners = event._dispatchListeners;
1375 var dispatchInstances = event._dispatchInstances;
1376 {
1377 validateEventDispatches(event);
1378 }
1379 if (Array.isArray(dispatchListeners)) {
1380 for (var i = 0; i < dispatchListeners.length; i++) {
1381 if (event.isPropagationStopped()) {
1382 break;
1383 }
1384 // Listeners and Instances are two parallel arrays that are always in sync.
1385 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
1386 }
1387 } else if (dispatchListeners) {
1388 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
1389 }
1390 event._dispatchListeners = null;
1391 event._dispatchInstances = null;
1392}
1393
1394/**
1395 * @see executeDispatchesInOrderStopAtTrueImpl

Callers 1

Calls 1

executeDispatchFunction · 0.70

Tested by

no test coverage detected