开发者

instance field native JS global

开发者 https://www.devze.com 2023-01-22 19:46 出处:网络
<script type=\"text/javascript\"> var a = 0; </script> Now I have GWT: public class AA implements EntryPoint {
<script type="text/javascript">
var a = 0;
</script>

Now I have GWT:

public class AA implements EntryPoint {

  public final int a =44;

}

How c开发者_StackOverflow社区an i transfer instance field a to native global javascript variable so that it can be callable from javascript method?


public native void init ( Integer arg )/*-{
    $wnd.a = arg;
}-*/;
0

精彩评论

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