Here is an early draft for adding support for JavaScript object literals in
GWT JsInterop:
http://goo.gl/K2Aygn
TL;DR;
@JsType(literal=true)
class MapOptions {
public double zoom;
public int mapTypeId;
public LatLon center;
}
MapOptions options = new MapOptions() {{
zoom = 8;
mapTypeId = ...
center = ...
}};
will generate:
var mapOptions = {
zoom: 8,
mapTypeId: ...,
center: ...,
};
And details in the document =)
Have a nice weekend!
- Goktug
--
You received this message because you are subscribed to the Google Groups "GWT
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAN%3DyUA1Pr8C0onbhMSJHdmRoGXGO23rc8TkcB1qKFWo3tLSY4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.