* Standard/simple iteration through an event's collected dispatches.
(event, simulated)
| 1499 | * Standard/simple iteration through an event's collected dispatches. |
| 1500 | */ |
| 1501 | function executeDispatchesInOrder(event, simulated) { |
| 1502 | var dispatchListeners = event._dispatchListeners; |
| 1503 | var dispatchInstances = event._dispatchInstances; |
| 1504 | { |
| 1505 | validateEventDispatches(event); |
| 1506 | } |
| 1507 | if (Array.isArray(dispatchListeners)) { |
| 1508 | for (var i = 0; i < dispatchListeners.length; i++) { |
| 1509 | if (event.isPropagationStopped()) { |
| 1510 | break; |
| 1511 | } |
| 1512 | // Listeners and Instances are two parallel arrays that are always in sync. |
| 1513 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); |
| 1514 | } |
| 1515 | } else if (dispatchListeners) { |
| 1516 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances); |
| 1517 | } |
| 1518 | event._dispatchListeners = null; |
| 1519 | event._dispatchInstances = null; |
| 1520 | } |
| 1521 | |
| 1522 | /** |
| 1523 | * @see executeDispatchesInOrderStopAtTrueImpl |
no test coverage detected