GWT 2.7:-XjsInteropMode JS和-XjsInteropMode CLOSURE有什么区别?

con*_*ile 7 html javascript java gwt gwt-2.7

我尝试了GWT 2.7,并且想知道-XjsInteropMode JS和-XjsInteropMode CLOSURE编译器标志之间有什么区别?

Aja*_*jax 7

-XjsInteropMode JS将输出标准的反混淆javascript访问器(方法名称直接匹配,bean getter/setters映射到简单的属性访问).我假设使用CLOSURE选项会将Closure类型注释添加到输出中以确保Gwt和Closure之间的双向类型安全......但Goktug已回复G +,说:

-XjsInteropMode CLOSURE was used to generate export code in a way
that was assuming closure goog.provide(...) statements exists in
the beginning of js (potentially produced and prepended by a linker).
It was not useful for general public.

I'm using past tense because the option is now removed from the trunk.
Run Code Online (Sandbox Code Playgroud)

Anways,如果你对Clwt with Gwt感兴趣,视频还没有上传,但Ray Cromwell关于Google Inbox的讨论提到他们如何支持高度优化,快速编译Gwt - > Closure Friendly JS - > Minified混淆JS.

视频启动时,请在此处查看:http: //gwtcreate.com/videos/index.html 此前,幻灯片是:https: //drive.google.com/a/wetheinter.net/file/ d/0B3ktS-w9vr8IS2ZwQkw3WVRVeXc /视图

最后,Ray专门讨论了Js Interop:https: //docs.google.com/a/wetheinter.net/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit

请注意,还有一个待处理的视频视频.这很好.您应该在上传时看到它们.