MCPcopy Index your code
hub / github.com/caseywebdev/react-list / dispatchEvent

Function dispatchEvent

docs/index.js:17987–18070  ·  view source on GitHub ↗
(
  domEventName,
  eventSystemFlags,
  targetContainer,
  nativeEvent
)

Source from the content-addressed store, hash-verified

17985 }
17986}
17987function dispatchEvent(
17988 domEventName,
17989 eventSystemFlags,
17990 targetContainer,
17991 nativeEvent
17992) {
17993 if (_enabled) {
17994 var blockedOn = findInstanceBlockingEvent(nativeEvent);
17995 if (null === blockedOn)
17996 dispatchEventForPluginEventSystem(
17997 domEventName,
17998 eventSystemFlags,
17999 nativeEvent,
18000 return_targetInst,
18001 targetContainer
18002 ),
18003 clearIfContinuousEvent(domEventName, nativeEvent);
18004 else if (
18005 queueIfContinuousEvent(
18006 blockedOn,
18007 domEventName,
18008 eventSystemFlags,
18009 targetContainer,
18010 nativeEvent
18011 )
18012 )
18013 nativeEvent.stopPropagation();
18014 else if (
18015 (clearIfContinuousEvent(domEventName, nativeEvent),
18016 eventSystemFlags & 4 &&
18017 -1 < discreteReplayableEvents.indexOf(domEventName))
18018 ) {
18019 for (; null !== blockedOn; ) {
18020 var fiber = getInstanceFromNode(blockedOn);
18021 if (null !== fiber)
18022 switch (fiber.tag) {
18023 case 3:
18024 fiber = fiber.stateNode;
18025 if (fiber.current.memoizedState.isDehydrated) {
18026 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
18027 if (0 !== lanes) {
18028 var root = fiber;
18029 root.pendingLanes |= 2;
18030 for (root.entangledLanes |= 2; lanes; ) {
18031 var lane = 1 << (31 - clz32(lanes));
18032 root.entanglements[1] |= lane;
18033 lanes &= ~lane;
18034 }
18035 ensureRootIsScheduled(fiber);
18036 0 === (executionContext & 6) &&
18037 ((workInProgressRootRenderTargetTime = now() + 500),
18038 flushSyncWorkAcrossRoots_impl(0, !1));
18039 }
18040 }
18041 break;
18042 case 13:
18043 (root = enqueueConcurrentRenderForLane(fiber, 2)),
18044 null !== root && scheduleUpdateOnFiber(root, fiber, 2),

Callers 2

dispatchDiscreteEventFunction · 0.85
dispatchContinuousEventFunction · 0.85

Calls 12

clearIfContinuousEventFunction · 0.85
queueIfContinuousEventFunction · 0.85
getInstanceFromNodeFunction · 0.85
getHighestPriorityLanesFunction · 0.85
ensureRootIsScheduledFunction · 0.85
scheduleUpdateOnFiberFunction · 0.85
flushSyncWork$1Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…