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

Function extractEvents

code/third-party/public/app.js:1596–1609  ·  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

1594 * @internal
1595 */
1596function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1597 var events = null;
1598 for (var i = 0; i < plugins.length; i++) {
1599 // Not every plugin in the ordering may be loaded at runtime.
1600 var possiblePlugin = plugins[i];
1601 if (possiblePlugin) {
1602 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
1603 if (extractedEvents) {
1604 events = accumulateInto(events, extractedEvents);
1605 }
1606 }
1607 }
1608 return events;
1609}
1610
1611function runEventsInBatch(events, simulated) {
1612 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected