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

Function extractEvents

code/redux/public/app.js:2614–2627  ·  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

2612 * @internal
2613 */
2614function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2615 var events = null;
2616 for (var i = 0; i < plugins.length; i++) {
2617 // Not every plugin in the ordering may be loaded at runtime.
2618 var possiblePlugin = plugins[i];
2619 if (possiblePlugin) {
2620 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2621 if (extractedEvents) {
2622 events = accumulateInto(events, extractedEvents);
2623 }
2624 }
2625 }
2626 return events;
2627}
2628
2629function runEventsInBatch(events, simulated) {
2630 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected