开发者

Sending Javascript to GWT JSNI

I know how to call Javascript from GWT.But I have a javascript function that returns a string so, how could I when that function is called 开发者_开发技巧send it to GWT.

Hope this makes sense


This is how you collect strings from JSNI fn

public static native String stringExample() /*-{ return "String1"; }-*/;

This is how you pass a string to JSNI fn

public static native void alert(String msg) /*-{ $wnd.alert(msg); }-*/;

Hope this is what you were looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜