Why does GWT have two element types? you have com.google.gwt.dom.client.Element & com.google.gwt.user.client.Element – when would you use one over the other and are they compatible as am getting the following exception..
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Object [object DOMWindow] has no method 'setAttribute'
Thanks..
Ian..
If you look in the sources you will see that com.google.gwt.user.client.Element extends com.google.gwt.dom.client.Element. com.google.gwt.user.client.Element is actually a legacy class from GWT 1.4. Since 2.0 GWT team decided to make some refactorings, but they needed keep backward compatibility, so you have basically the same class in two packages.
those two object’s doesn’t have anything to do with your error. Most likely you’ve casted window object into Element, that’s why you are getting this error.