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