*
*/
public void cancel(Element e) {
+ // This has to be the order of calls
+ cancel(e.<com.google.gwt.dom.client.Element>cast());
}
/**
*
*/
public void cancel(com.google.gwt.dom.client.Element e) {
- cancel((Element)e);
}
/**
*
*/
public Object f(Element e, int i) {
- Widget w = GQuery.getAssociatedWidget(e);
- if (w != null){
- f(w, i);
- } else {
- f(e);
- }
- return null;
+ // This has to be the order of calls
+ return f(e.<com.google.gwt.dom.client.Element>cast(), i);
}
/**
*
*/
public Object f(com.google.gwt.dom.client.Element e, int i) {
- return f(e.<Element>cast(), i);
+ Widget w = GQuery.getAssociatedWidget(e);
+ if (w != null){
+ f(w, i);
+ } else {
+ f(e);
+ }
+ return null;
}
/**
* @param e takes a com.google.gwt.user.client.Element
*/
public void f(Element e) {
- Widget w = GQuery.getAssociatedWidget(e);
- if (w != null){
- f(w);
- }else{
- f();
- }
+ // This has to be the order of calls
+ f(e.<com.google.gwt.dom.client.Element>cast());
}
/**
* @param e takes a com.google.gwt.dom.client.Element
*/
public void f(com.google.gwt.dom.client.Element e) {
- f((Element)e);
+ Widget w = GQuery.getAssociatedWidget(e);
+ if (w != null){
+ f(w);
+ }else{
+ f();
+ }
}
/**
}
public void testMap() {
- String html = "<div class='d' id='6'></div><span class='s' id='5'></span><p class='p' id='4'></p><em class='d' id='3'></em><b class='s' id='2'></b><i class='p' id='1'></i><strong></strong>";
+ String html = "<div class='d' id='6'></div>" +
+ "<span class='s' id='5'></span>" +
+ "<p class='p' id='4'></p>" +
+ "<em class='d' id='3'></em>" +
+ "<b class='s' id='2'></b>" +
+ "<i class='p' id='1'></i>" +
+ "<strong></strong>";
$(e).html(html);
GQuery c = $(e).children();
- assertEquals(8, c.size());
+ assertEquals(7, c.size());
// A list of lists containing tag,class,id, remove elements without id
List<List<String>> m = $(e).children().map(new Function() {
- @SuppressWarnings("unchecked")
public List<String> f(Element e, int i) {
// map does not add to the list null elements
if ($(e).attr("id").isEmpty() || $(e).attr("class").isEmpty()) {