GWT で JSNI からJavaScript関数を返すにはどうすればよいですか? 私は次の方法でそれを試しました:
/* JSNI method returning a js-function */
public static native JavaScriptObject native_getFunction() /*-{
return function(a,b){
//do some stuff with a,b
}
}-*/;
関数を変数に格納する
/* outside from GWT: store the function in a variable */
JavaScriptObject myFunction = native_getFunction();
後で関数を使用すると、次のエラー メッセージが生成されます。
(TypeError): object is not a function
誰かがこの問題を解決する方法を知っていますか?