(events, simulated)
| 1737 | } |
| 1738 | |
| 1739 | function runEventsInBatch(events, simulated) { |
| 1740 | if (events !== null) { |
| 1741 | eventQueue = accumulateInto(eventQueue, events); |
| 1742 | } |
| 1743 | |
| 1744 | // Set `eventQueue` to null before processing it so that we can tell if more |
| 1745 | // events get enqueued while processing. |
| 1746 | var processingEventQueue = eventQueue; |
| 1747 | eventQueue = null; |
| 1748 | |
| 1749 | if (!processingEventQueue) { |
| 1750 | return; |
| 1751 | } |
| 1752 | |
| 1753 | if (simulated) { |
| 1754 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated); |
| 1755 | } else { |
| 1756 | forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel); |
| 1757 | } |
| 1758 | !!eventQueue ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.') : void 0; |
| 1759 | // This would be a good time to rethrow if any of the event handlers threw. |
| 1760 | ReactErrorUtils.rethrowCaughtError(); |
| 1761 | } |
| 1762 | |
| 1763 | function runExtractedEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget) { |
| 1764 | var events = extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget); |
no test coverage detected