Wednesday, January 17, 2018

Re: external javascript library

Yes, you can define Java APIs in GWT that directly call external JavaScript. GWT itself uses the same technique to emulate JRE classes and map them to JavaScript if possible (e.g. java.util.Date is mostly mapped to JavaScript Date).

In older GWT versions (below 2.8.x) the technique is called JSNI

http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html

but it's use is discouraged because future versions of GWT will not support it anymore. The replacement is called JsInterop and you can get an in-depth overview at

https://docs.google.com/document/d/10fmlEYIHcyead_4R1S5wKGs1t2I7Fnp_PaNaa7XTEk0/edit


-- J.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment