I'm using the gwt-interop-utils -> https://github.com/GWTReact/gwt-interop-utils/blob/master/src/gwt/interop/utils/client/plainobjects/JsPlainObj.java
And when I inspect the javascript object in the browser you can see it has lots of garbage, and I cant clean it. See the nodes array I have (_clazz_0_g$,__elementTypeCategory$,_elementTypeId$"......).
And when I do the same with Js I don't have this garbage (obvious).
I already used the JsArray and everything, but no luck =/.
Do you have any Idea how to have a plain javascript array with jsInterop?
Thanks a lot.
@JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object")
public class NodeSet {
public int id;
public int x; <-- conside use of double
public int y;
public int[] nodes;
@JsOverlay
public static NodeSet create(int id, int x, int y, int[] nodes) {
final NodeSet ns = new NodeSet();
ns.id = id;
ns.x = x;
ns.y = y;
ns.nodes = nodes;
return ns;
}
}
--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
JsArrayInteger arr = JavaScriptObject.createArray().cast();
for (int node : nodes) {
arr.push(node);
}JsArray<Double> arr = new JsArray<>();
for (int node : nodes) {
arr.push(node)
}