MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / extractEvents

Function extractEvents

code/new-context-api/public/app.js:1724–1737  ·  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

1722 * @internal
1723 */
1724function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1725 var events = null;
1726 for (var i = 0; i < plugins.length; i++) {
1727 // Not every plugin in the ordering may be loaded at runtime.
1728 var possiblePlugin = plugins[i];
1729 if (possiblePlugin) {
1730 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
1731 if (extractedEvents) {
1732 events = accumulateInto(events, extractedEvents);
1733 }
1734 }
1735 }
1736 return events;
1737}
1738
1739function runEventsInBatch(events, simulated) {
1740 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected