1) Can you give a concrete example on how much that cost will lower in comparison with JSNI?
It won't lower. You still have to keep things in sync. If the library in question uses something like JsDoc you can code a generator to produce the Java API.
2) Right now I am using JSNI to fill even GWT unimplemented functionality - for example querySelectorAll(). Will that would be possible with JsInterop? or this is an Elemental thingy?
Sure, JsInterop and JSNI are not very different. Instead of implementing JSNI one-liner methods you only define an interface and put an annotation on it. With Java8 there is even the idea that you can put a default method in your Jsinterop interface which contains a polyfill implementation. GWT will then transparently check if that method natively exists and if not call the polyfill code. But I don't know if that is still planned or if they expect you to install the polyfill manually.
Elemental 2.0 will be generated against html5index.org (which in turn is generated from all kinds of IDLs and spec pages) and thus will allow you to access all browser APIs.
3) If it's an elemental thingy (creating java binidings from IDL) - wouldn't that approach be usable also for other 3rd party js libraries (write an IDL file for each one of them)?
Sure. You just need some extra metadata so you know the types returned and consumed by JS methods. This can be done through IDL or things like JsDoc. For example Vaadin has a JsDoc based generator they have used to generate the Polymer integration: https://github.com/vaadin/gwt-api-generator
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
Post a Comment