MCPcopy Create free account
hub / github.com/Lobos/react-ui / executeDispatch

Function executeDispatch

docs/lib/react.js:2856–2865  ·  view source on GitHub ↗

* Dispatch the event to the listener. * @param {SyntheticEvent} event SyntheticEvent to handle * @param {boolean} simulated If the event is simulated (changes exn behavior) * @param {function} listener Application-level callback * @param {*} inst Internal component instance

(event, simulated, listener, inst)

Source from the content-addressed store, hash-verified

2854 * @param {*} inst Internal component instance
2855 */
2856function executeDispatch(event, simulated, listener, inst) {
2857 var type = event.type || 'unknown-event';
2858 event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
2859 if (simulated) {
2860 ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
2861 } else {
2862 ReactErrorUtils.invokeGuardedCallback(type, listener, event);
2863 }
2864 event.currentTarget = null;
2865}
2866
2867/**
2868 * Standard/simple iteration through an event's collected dispatches.

Callers 1

executeDispatchesInOrderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…