Skip to content

Instantly share code, notes, and snippets.

@imjasonh
Created March 11, 2012 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imjasonh/2018190 to your computer and use it in GitHub Desktop.
Save imjasonh/2018190 to your computer and use it in GitHub Desktop.
public class MyEntryPoint implements EntryPoint {
public void onModuleLoad() {
jsniAlert();
jsniAlertParam("Hello");
jsniAlertParam("World");
}
private static final native void jsniAlert() /*-{
$wnd.alert("Called JSNI alert");
}-*/;
private static final native void jsniAlertParam(String msg) /*-{
$wnd.alert("Called JSNI alert with param: " + msg);
}-*/;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment