Skip to content

Commit 3e476d0

Browse files
committed
Remove cast API that already provides elemetal2
1 parent b77b84b commit 3e476d0

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

lib/com/vaadin/polymer/Polymer.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -581,16 +581,10 @@ public native static <T> T apply(Object jso, String methodName, Object... args)
581581
return jso[methodName].apply(jso, args);
582582
}-*/;
583583

584-
public static native <T> T cast(Object o)
585-
/*-{
586-
return o;
587-
}-*/;
588-
589584
/**
590585
* Return the dom API of one element.
591586
*/
592587
public static DomApi dom(Object element) {
593588
return Polymer.dom(element);
594589
}
595590
}
596-

lib/com/vaadin/polymer/PolymerElement.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import static jsinterop.annotations.JsPackage.GLOBAL;
44

55
import elemental2.dom.HTMLElement;
6-
import jsinterop.annotations.JsOverlay;
76
import jsinterop.annotations.JsType;
8-
import com.vaadin.polymer.PolymerFunction;
97

108
/**
119
* PolymerElement is a class over the HTMLElement of elemental2 adding
@@ -17,7 +15,7 @@ public class PolymerElement extends HTMLElement {
1715

1816
/** Properties and methods added by Polymer API **/
1917
public HTMLElement root;
20-
public native void debounce(String name, PolymerFunction f, int timeout);
18+
public native void debounce(String name, PolymerFunction<?, ?> f, int timeout);
2119
/**
2220
* Polymer’s custom property shim evaluates and applies custom property values once at element creation time.
2321
* In order to have an element (and its subtree) re- evaluate custom property values due to dynamic changes
@@ -27,16 +25,4 @@ public class PolymerElement extends HTMLElement {
2725

2826
/** Missing properties in elemental2.dom.Element **/
2927
public String textContent;
30-
31-
/** Helper methods **/
32-
@SuppressWarnings("unchecked")
33-
@JsOverlay public final <T> T cast() {
34-
return (T) this;
35-
}
36-
37-
@SuppressWarnings("unchecked")
38-
@JsOverlay public static final <T extends PolymerElement>T as(Object o) {
39-
return (T) o;
40-
}
41-
4228
}

0 commit comments

Comments
 (0)