MCPcopy Create free account
hub / github.com/microsoft/SandDance / runEventsInBatch

Function runEventsInBatch

docs/external/js/react-dom.development.js:3413–3437  ·  view source on GitHub ↗
(events)

Source from the content-addressed store, hash-verified

3411 };
3412
3413 function runEventsInBatch(events) {
3414 if (events !== null) {
3415 eventQueue = accumulateInto(eventQueue, events);
3416 } // Set `eventQueue` to null before processing it so that we can tell if more
3417 // events get enqueued while processing.
3418
3419
3420 var processingEventQueue = eventQueue;
3421 eventQueue = null;
3422
3423 if (!processingEventQueue) {
3424 return;
3425 }
3426
3427 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
3428
3429 if (!!eventQueue) {
3430 {
3431 throw Error( "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented." );
3432 }
3433 } // This would be a good time to rethrow if any of the event handlers threw.
3434
3435
3436 rethrowCaughtError();
3437 }
3438
3439 /**
3440 * Gets the target node from a native browser event by accounting for

Callers 2

runEventInBatchFunction · 0.85

Calls 3

accumulateIntoFunction · 0.85
forEachAccumulatedFunction · 0.85
rethrowCaughtErrorFunction · 0.85

Tested by

no test coverage detected