* Standard/simple iteration through an event's collected dispatches.
(event)
| 388 | */ |
| 389 | |
| 390 | function executeDispatchesInOrder(event) { |
| 391 | var dispatchListeners = event._dispatchListeners; |
| 392 | var dispatchInstances = event._dispatchInstances; |
| 393 | |
| 394 | { |
| 395 | validateEventDispatches(event); |
| 396 | } |
| 397 | |
| 398 | if (Array.isArray(dispatchListeners)) { |
| 399 | for (var i = 0; i < dispatchListeners.length; i++) { |
| 400 | if (event.isPropagationStopped()) { |
| 401 | break; |
| 402 | } // Listeners and Instances are two parallel arrays that are always in sync. |
| 403 | |
| 404 | |
| 405 | executeDispatch(event, dispatchListeners[i], dispatchInstances[i]); |
| 406 | } |
| 407 | } else if (dispatchListeners) { |
| 408 | executeDispatch(event, dispatchListeners, dispatchInstances); |
| 409 | } |
| 410 | |
| 411 | event._dispatchListeners = null; |
| 412 | event._dispatchInstances = null; |
| 413 | } |
| 414 | |
| 415 | var FunctionComponent = 0; |
| 416 | var ClassComponent = 1; |
no test coverage detected