MCPcopy Create free account
hub / github.com/microsoft/SandDance / extractPluginEvents

Function extractPluginEvents

docs/external/js/react-dom.development.js:3616–3633  ·  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, eventSystemFlags)

Source from the content-addressed store, hash-verified

3614
3615
3616 function extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
3617 var events = null;
3618
3619 for (var i = 0; i < plugins.length; i++) {
3620 // Not every plugin in the ordering may be loaded at runtime.
3621 var possiblePlugin = plugins[i];
3622
3623 if (possiblePlugin) {
3624 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
3625
3626 if (extractedEvents) {
3627 events = accumulateInto(events, extractedEvents);
3628 }
3629 }
3630 }
3631
3632 return events;
3633 }
3634
3635 function runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {
3636 var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);

Callers 1

Calls 1

accumulateIntoFunction · 0.85

Tested by

no test coverage detected