import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import com.google.gwt.core.client.JsArrayMixed;
-import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Node;
* Check is a javascript object can be cast to an Element
*/
public static native boolean isElement(Object o) /*-{
- return o && o.nodeType && o.nodeName ? true : false;
+ return !!o && 'nodeType' in o && 'nodeName' in o;
}-*/;
/**
b2.click();
assertEquals("red", $(b1).css("color", false));
}
+
+ public void testSelectorWidget() {
+ final Button b1 = new Button("click-me");
+ RootPanel.get().add(b1);
+ GQuery g = $(b1);
+ assertEquals("inline-block", $(b1).css("display"));
+ g.hide();
+ assertEquals("none", $(b1).css("display"));
+ }
}