MCPcopy Create free account
hub / github.com/microsoft/SandDance / executeDispatchesInOrder

Function executeDispatchesInOrder

docs/external/js/react-dom.development.js:390–413  ·  view source on GitHub ↗

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

(event)

Source from the content-addressed store, hash-verified

388 */
389
390 function executeDispatchesInOrder(event) {
391 var dispatchListeners = event._dispatchListeners;
392 var dispatchInstances = event._dispatchInstances;
393
394 {
395 validateEventDispatches(event);
396 }
397
398 if (Array.isArray(dispatchListeners)) {
399 for (var i = 0; i < dispatchListeners.length; i++) {
400 if (event.isPropagationStopped()) {
401 break;
402 } // Listeners and Instances are two parallel arrays that are always in sync.
403
404
405 executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
406 }
407 } else if (dispatchListeners) {
408 executeDispatch(event, dispatchListeners, dispatchInstances);
409 }
410
411 event._dispatchListeners = null;
412 event._dispatchInstances = null;
413 }
414
415 var FunctionComponent = 0;
416 var ClassComponent = 1;

Callers 1

Calls 1

executeDispatchFunction · 0.85

Tested by

no test coverage detected