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

Function extractEvents

code/styling/public/app.js:2363–2376  ·  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

2361 * @internal
2362 */
2363function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2364 var events = null;
2365 for (var i = 0; i < plugins.length; i++) {
2366 // Not every plugin in the ordering may be loaded at runtime.
2367 var possiblePlugin = plugins[i];
2368 if (possiblePlugin) {
2369 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2370 if (extractedEvents) {
2371 events = accumulateInto(events, extractedEvents);
2372 }
2373 }
2374 }
2375 return events;
2376}
2377
2378function runEventsInBatch(events, simulated) {
2379 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected