MCPcopy Create free account
hub / github.com/reactjs/react-rails / replayUnblockedEvents

Function replayUnblockedEvents

lib/assets/react-source/development/react.js:7599–7644  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7597 }
7598
7599 function replayUnblockedEvents() {
7600 hasScheduledReplayAttempt = false; // First replay discrete events.
7601
7602 while (queuedDiscreteEvents.length > 0) {
7603 var nextDiscreteEvent = queuedDiscreteEvents[0];
7604
7605 if (nextDiscreteEvent.blockedOn !== null) {
7606 // We're still blocked.
7607 // Increase the priority of this boundary to unblock
7608 // the next discrete event.
7609 var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);
7610
7611 if (_fiber4 !== null) {
7612 attemptUserBlockingHydration(_fiber4);
7613 }
7614
7615 break;
7616 }
7617
7618 var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);
7619
7620 if (nextBlockedOn !== null) {
7621 // We're still blocked. Try again later.
7622 nextDiscreteEvent.blockedOn = nextBlockedOn;
7623 } else {
7624 // We've successfully replayed the first event. Let's try the next one.
7625 queuedDiscreteEvents.shift();
7626 }
7627 } // Next replay any continuous events.
7628
7629
7630 if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
7631 queuedFocus = null;
7632 }
7633
7634 if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
7635 queuedDrag = null;
7636 }
7637
7638 if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
7639 queuedMouse = null;
7640 }
7641
7642 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
7643 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
7644 }
7645
7646 function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
7647 if (queuedEvent.blockedOn === unblocked) {

Callers

nothing calls this directly

Calls 3

getInstanceFromNode$1Function · 0.85
attemptToDispatchEventFunction · 0.85

Tested by

no test coverage detected