Tag: gwt jsinterop

使用GWT JsInterop实现Javascript函数回调

我想包装像这样的javascript代码: map.addMarker({ lat: -12.043333, lng: -77.028333, draggable: true, fences: [polygon], outside: function(m, f){ alert(‘This marker has been moved outside of its fence’); } }); 我在这里用Java编写它: @JsType(namespace = JsPackage.GLOBAL, isNative = true, name = “Object”) public class MarkerOptions { @JsProperty public double lat; @JsProperty public double lng; @JsProperty public boolean draggable; @JsProperty public Polygon fences; @JsFunction […]