if ("submit".equals(htmlEvent)){
Function submitFunction = new Function() {
public void f(Element e) {
// first submit the form then call the others functions
if (FormElement.is(e)) {
e.<FormElement>cast().submit();
}
callHandlers(e, getEvent(), functions);
}
};
dispatchEvent(e, datas, submitFunction);