code: public void dispatchEvent(Event event, String eventName) {
      int typeInt = Event.getTypeInt(eventName);
      Object[] handlerData = $(element).data(EVENT_DATA);
      for (int i = 0, l = elementEvents.length(); i < l; i++) {
        BindFunction listener = elementEvents.get(i);
        String namespace = JsUtils.prop(event, "namespace");
        boolean matchEV = listener != null && (listener.hasEventType(typeInt) || listener.isTypeOf(eventName));
        boolean matchNS = matchEV && (isNullOrEmpty(namespace) || listener.nameSpace.equals(namespace));
        if (matchEV && matchNS) {
          if (!listener.fire(event, typeInt, eventName, handlerData)) {
            event.stopPropagation();
            event.preventDefault();
          }
        }
      }
    }
docs: Dispatch an event in this element but changing the type,
  it's useful for special events.