Javascript events have a "cancelable" property.
How can this property be accessed from GWT code? It is not exported in GWT Event or NativeEvent classes.
Javascript events have a "cancelable" property.
How can this property be accessed from GWT code? It is not exported in GWT Event or NativeEvent classes.
You could use JSNI:
public native boolean eventIsCancelable(NativeEvent evt) /*-{
return typeof evt.cancelable !== 'boolean' || evt.cancelable;
}-*/;
Anyway, is calling
event.preventDefault();
event.stopPropagation();
not enough?