GWT 2.7:-XjsInteropMode JS和-XjsInteropMode CLOSURE之间的区别是什么?

问题描述:

我试用了GWT 2.7,并且弄坏了-XjsInteropMode JS和-XjsInteropMode CLOSURE编译器标志之间的区别是什么?GWT 2.7:-XjsInteropMode JS和-XjsInteropMode CLOSURE之间的区别是什么?

-XjsInteropMode JS将输出标准的反混淆javascript访问器(方法名称直接匹配,bean getter/setters映射到简单属性访问)。我假设,使用闭幕选项将关闭类型注释添加到输出,以确保GWT和封闭之间的双向式安全......但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. 

Anways,如果你对Gwt的封闭感兴趣,视频还没有出来,但是Ray Cromwell关于Google Inbox的谈话提到他们如何支持Gwt的高度优化,快速编译 - > Closure Friendly JS - > Minified obfuscated JS。

当视频到了,看看这里: http://gwtcreate.com/videos/index.html 在此之前,这里的幻灯片: https://drive.google.com/a/wetheinter.net/file/d/0B3ktS-w9vr8IS2ZwQkw3WVRVeXc/view

最后,雷人的谈话特别是约的js互操作性: https://docs.google.com/a/wetheinter.net/file/d/0ByS1wxINeBWjeGYxbkJpamxFZ28/edit

注意,有也是这个谈话的视频。这很好。上传时,你应该观看它们。