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