function executeDispatch(event, listener, inst) {
  event.currentTarget = getNodeFromInstance(inst);
  try {
    listener(event);
  } catch (error) {
    if (!hasError) {
      hasError = true;
      caughtError = error;
    } else {
      // TODO: Make sure this error gets logged somehow.
    }
  }
  event.currentTarget = null;
}
Dispatch the event to the listener.
@param {SyntheticEvent} event SyntheticEvent to handle
@param {function} listener Application-level callback
@param {*} inst Internal component instance