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

Function dispatchEventForPluginEventSystem

docs/index.js:15301–15771  ·  view source on GitHub ↗
(
  domEventName,
  eventSystemFlags,
  nativeEvent,
  targetInst$jscomp$0,
  targetContainer
)

Source from the content-addressed store, hash-verified

15299 : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);
15300}
15301function dispatchEventForPluginEventSystem(
15302 domEventName,
15303 eventSystemFlags,
15304 nativeEvent,
15305 targetInst$jscomp$0,
15306 targetContainer
15307) {
15308 var ancestorInst = targetInst$jscomp$0;
15309 if (
15310 0 === (eventSystemFlags & 1) &&
15311 0 === (eventSystemFlags & 2) &&
15312 null !== targetInst$jscomp$0
15313 )
15314 a: for (;;) {
15315 if (null === targetInst$jscomp$0) return;
15316 var nodeTag = targetInst$jscomp$0.tag;
15317 if (3 === nodeTag || 4 === nodeTag) {
15318 var container = targetInst$jscomp$0.stateNode.containerInfo;
15319 if (
15320 container === targetContainer ||
15321 (8 === container.nodeType && container.parentNode === targetContainer)
15322 )
15323 break;
15324 if (4 === nodeTag)
15325 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
15326 var grandTag = nodeTag.tag;
15327 if (3 === grandTag || 4 === grandTag)
15328 if (
15329 ((grandTag = nodeTag.stateNode.containerInfo),
15330 grandTag === targetContainer ||
15331 (8 === grandTag.nodeType &&
15332 grandTag.parentNode === targetContainer))
15333 )
15334 return;
15335 nodeTag = nodeTag.return;
15336 }
15337 for (; null !== container; ) {
15338 nodeTag = getClosestInstanceFromNode(container);
15339 if (null === nodeTag) return;
15340 grandTag = nodeTag.tag;
15341 if (
15342 5 === grandTag ||
15343 6 === grandTag ||
15344 26 === grandTag ||
15345 27 === grandTag
15346 ) {
15347 targetInst$jscomp$0 = ancestorInst = nodeTag;
15348 continue a;
15349 }
15350 container = container.parentNode;
15351 }
15352 }
15353 targetInst$jscomp$0 = targetInst$jscomp$0.return;
15354 }
15355 batchedUpdates$1(function () {
15356 var targetInst = ancestorInst,
15357 nativeEventTarget = getEventTarget(nativeEvent),
15358 dispatchQueue = [];

Callers 1

dispatchEventFunction · 0.85

Calls 15

batchedUpdates$1Function · 0.85
getEventTargetFunction · 0.85
getEventCharCodeFunction · 0.85
getListenerFunction · 0.85
createDispatchListenerFunction · 0.85
getNearestMountedFiberFunction · 0.85
getNodeFromInstanceFunction · 0.85
getParentFunction · 0.85
isTextInputElementFunction · 0.85
isCustomElementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…