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

Function getTopLevelCallbackBookKeeping

code/styling/public/app.js:5811–5825  ·  view source on GitHub ↗
(topLevelType, nativeEvent, targetInst)

Source from the content-addressed store, hash-verified

5809
5810// Used to store ancestor hierarchy in top level callback
5811function getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst) {
5812 if (callbackBookkeepingPool.length) {
5813 var instance = callbackBookkeepingPool.pop();
5814 instance.topLevelType = topLevelType;
5815 instance.nativeEvent = nativeEvent;
5816 instance.targetInst = targetInst;
5817 return instance;
5818 }
5819 return {
5820 topLevelType: topLevelType,
5821 nativeEvent: nativeEvent,
5822 targetInst: targetInst,
5823 ancestors: []
5824 };
5825}
5826
5827function releaseTopLevelCallbackBookKeeping(instance) {
5828 instance.topLevelType = null;

Callers 1

dispatchEventFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected