MCPcopy
hub / github.com/t4t5/sweetalert / executeDirectDispatch

Function executeDirectDispatch

docs/assets/js/index.js:68203–68216  ·  view source on GitHub ↗

* Execution of a "direct" dispatch - there must be at most one dispatch * accumulated on the event or it is considered an error. It doesn't really make * sense for an event with multiple dispatches (bubbled) to keep track of the * return values at each dispatch execution, but it does tend to make

(event)

Source from the content-addressed store, hash-verified

68201 * @return {*} The return value of executing the single dispatch.
68202 */
68203function executeDirectDispatch(event) {
68204 if (process.env.NODE_ENV !== 'production') {
68205 validateEventDispatches(event);
68206 }
68207 var dispatchListener = event._dispatchListeners;
68208 var dispatchInstance = event._dispatchInstances;
68209 !!Array.isArray(dispatchListener) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
68210 event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
68211 var res = dispatchListener ? dispatchListener(event) : null;
68212 event.currentTarget = null;
68213 event._dispatchListeners = null;
68214 event._dispatchInstances = null;
68215 return res;
68216}
68217
68218/**
68219 * @param {SyntheticEvent} event

Callers

nothing calls this directly

Calls 1

invariantFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…