Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
GWT から Javascript を呼び出す方法は知っていますが、文字列を返す JavaScript 関数があるので、その関数が呼び出されたときに GWT に送信するにはどうすればよいでしょうか。
これが理にかなっていることを願っています
これは、JSNI fn から文字列を収集する方法です
public static native String stringExample() /*-{ return "String1"; }-*/;
これは、文字列を JSNI fn に渡す方法です
public static native void alert(String msg) /*-{ $wnd.alert(msg); }-*/;
これがあなたが探していたものであることを願っています。