* 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)
| 68201 | * @return {*} The return value of executing the single dispatch. |
| 68202 | */ |
| 68203 | function 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…