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

Function extractEvents

code/communication/public/app.js:2398–2411  ·  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

2396 * @internal
2397 */
2398function extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2399 var events = null;
2400 for (var i = 0; i < plugins.length; i++) {
2401 // Not every plugin in the ordering may be loaded at runtime.
2402 var possiblePlugin = plugins[i];
2403 if (possiblePlugin) {
2404 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2405 if (extractedEvents) {
2406 events = accumulateInto(events, extractedEvents);
2407 }
2408 }
2409 }
2410 return events;
2411}
2412
2413function runEventsInBatch(events, simulated) {
2414 if (events !== null) {

Callers 1

Calls 1

accumulateIntoFunction · 0.70

Tested by

no test coverage detected