【发布时间】:2012-01-05 11:19:38
【问题描述】:
在 Javascript 中,我可以写:
var circles = document.all.tags("circle");
在 circles 变量中,我将有一个圆形标签列表。
如何在 GWT 中执行此操作? 我写道:
public final native void getPoints() /*-{
this.points = $doc.all.tags("circle");
}-*/;
public final native String toJSON() /*-{
return $wnd.JSON.stringify(this);
}-*/;
但是当我调用toJSON 方法时,我有异常。
【问题讨论】:
-
InvocationTargetException 没有任何描述。