I'm using Element.dispatchEvent() method to dispatch native event in GWT 
like this:

final NativeEvent nativeEvent = 
event.getNativeEvent();Scheduler.get().scheduleDeferred(new 
Scheduler.ScheduledCommand() {
    @Override
    public void execute() {
        element.dispatchEvent(nativeEvent);
    }});

Method dispatchEvent() is provided by GWT and looks like:

public final void dispatchEvent(NativeEvent evt) {
  DOMImpl.impl.dispatchEvent(this, evt);}

This code throws exception with the following stack trace:

com.google.gwt.core.shared.SerializableThrowable: (undefined) : DOM Exception: 
NOT_SUPPORTED_ERR (9)
        at 
com.google.gwt.core.client.impl.StackTraceCreator$CollectorEmulated.$fillInStackTrace(StackTraceCreator.java:180)
 ~[gwt-servlet-2.6.0.jar:na]
        at java.lang.Throwable.fillInStackTrace(Throwable.java:518) 
~[na:1.8.0_31]
        at java.lang.Throwable.Throwable(Throwable.java:51) ~[na:1.8.0_31]
        at java.lang.Exception.Exception(Exception.java:25) ~[na:1.8.0_31]
        at 
java.lang.RuntimeException.RuntimeException(RuntimeException.java:25) 
~[na:1.8.0_31]
        at 
com.google.gwt.core.client.JavaScriptException.JavaScriptException(JavaScriptException.java:117)
 ~[gwt-servlet-2.6.0.jar:na]
        at 
com.google.gwt.lang.Exceptions.getCachableJavaScriptException(Exceptions.java:45)
 ~[na:na]
        at com.google.gwt.lang.Exceptions.wrap(Exceptions.java:29) ~[na:na]
        at 
com.google.gwt.dom.client.DOMImplStandard.$dispatchEvent(DOMImplStandard.java:69)
 ~[gwt-servlet-2.6.0.jar:na]


It seems that dispatchEvent() is not supported by the some elements, but 
I'm not sure which exactly.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to