* Standard/simple iteration through an event's collected dispatches.
(event, simulated)
| 2173 | * Standard/simple iteration through an event's collected dispatches. |
| 2174 | */ |
| 2175 | function 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 |
no test coverage detected