I have following code:
public static void show(String value){
Window.alert("From Java");
invokeMethod(); //Does not get called
}
public static native void invokeMethod() /*-{
alert("From JSNI");
}-*/;
I want to call a JSNI method from Java method, however invokeMethod() never gets called...
I could not find much use cases for calling JSNI method from Java.
Why isn't above code working?
$wnd.alertinstead ofalert. And make sure to click 'ok' on the first alert, or the second alert can't run.