How to check if an Event is cancelable from GWT code?

Viewed 99
1 Answers

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?

Related