MCPcopy Create free account
hub / github.com/Lobos/react-ui / executeDispatchesInOrder

Function executeDispatchesInOrder

docs/lib/react.js:2870–2889  ·  view source on GitHub ↗

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

(event, simulated)

Source from the content-addressed store, hash-verified

2868 * Standard/simple iteration through an event's collected dispatches.
2869 */
2870function executeDispatchesInOrder(event, simulated) {
2871 var dispatchListeners = event._dispatchListeners;
2872 var dispatchInstances = event._dispatchInstances;
2873 if ("development" !== 'production') {
2874 validateEventDispatches(event);
2875 }
2876 if (Array.isArray(dispatchListeners)) {
2877 for (var i = 0; i < dispatchListeners.length; i++) {
2878 if (event.isPropagationStopped()) {
2879 break;
2880 }
2881 // Listeners and Instances are two parallel arrays that are always in sync.
2882 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2883 }
2884 } else if (dispatchListeners) {
2885 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2886 }
2887 event._dispatchListeners = null;
2888 event._dispatchInstances = null;
2889}
2890
2891/**
2892 * Standard/simple iteration through an event's collected dispatches, but stops

Callers

nothing calls this directly

Calls 1

executeDispatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…