MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / extractEvents

Function extractEvents

code/dependency-injection/public/app.js:2456–2469  ·  view source on GitHub ↗

* Allows registered plugins an opportunity to extract events from top-level * native browser events. * * @return {*} An accumulation of synthetic events. * @internal

(topLevelType, targetInst, nativeEvent, nativeEventTarget)

Source from the content-addressed store, hash-verified

2454 * @internal
2455 */
2456function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2457 var events = null;
2458 for (var i = 0; i < plugins.length; i++) {
2459 // Not every plugin in the ordering may be loaded at runtime.
2460 var possiblePlugin = plugins[i];
2461 if (possiblePlugin) {
2462 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2463 if (extractedEvents) {
2464 events = accumulateInto(events, extractedEvents);
2465 }
2466 }
2467 }
2468 return events;
2469}
2470
2471function runEventsInBatch(events, simulated) {
2472 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected