* Standard/simple iteration through an event's collected dispatches.
(event, simulated)
| 2138 | * Standard/simple iteration through an event's collected dispatches. |
| 2139 | */ |
| 2140 | function executeDispatchesInOrder(event, simulated) { |
| 2141 | var dispatchListeners = event._dispatchListeners; |
| 2142 | var dispatchInstances = event._dispatchInstances; |
| 2143 | { |
| 2144 | validateEventDispatches(event); |
| 2145 | } |
| 2146 | if (Array.isArray(dispatchListeners)) { |
| 2147 | for (var i = 0; i < dispatchListeners.length; i++) { |
| 2148 | if (event.isPropagationStopped()) { |
| 2149 | break; |
| 2150 | } |
| 2151 | // Listeners and Instances are two parallel arrays that are always in sync. |
| 2152 | executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]); |
| 2153 | } |
| 2154 | } else if (dispatchListeners) { |
| 2155 | executeDispatch(event, simulated, dispatchListeners, dispatchInstances); |
| 2156 | } |
| 2157 | event._dispatchListeners = null; |
| 2158 | event._dispatchInstances = null; |
| 2159 | } |
| 2160 | |
| 2161 | /** |
| 2162 | * @see executeDispatchesInOrderStopAtTrueImpl |
no test coverage detected