作者:于英豪H | 来源:互联网 | 2023-01-18 17:22
http:code.google.comdocreader#pgoogle-web-toolkit-doc-1-5&sgoogle-web-toolkit-doc-1-5&
http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=FAQ_CompileOnePermutation
In the article I learned I can speed up the compiler but specifying the target user agent. The problem how can I specify more than one user agent? Suppose my application supports ie6 and FF3
在我学到的文章中,我可以加速编译器,但指定目标用户代理。问题如何指定多个用户代理?假设我的应用程序支持ie6和FF3
doesn't work - I got XML parsing error:
不起作用 - 我得到XML解析错误:
[ERROR] Invalid property value 'ie6,gecko1_8'
I'm wondering if there's a way to specify more than one specific user agent in the module XML file?
我想知道是否有办法在模块XML文件中指定多个特定用户代理?
5 个解决方案
In order to rapidly deploy any application, you'll need two targets; once for the engine your hosted mode deploys on {Firefox / Linux, Safari / Mac, IE6 / Win}, and one for your agile browser that lets you build css in real-time {Firefox + Firebug}.
为了快速部署任何应用程序,您需要两个目标;一次用于引擎,您的托管模式部署在{Firefox / Linux,Safari / Mac,IE6 / Win}上,一个用于您的敏捷浏览器,可以让您实时构建css {Firefox + Firebug}。
Linux:
Mac:
...etc...
This is GWT >= 1.6 ONLY!
这只是GWT> = 1.6!
For older gwt projects, you must super-source the com/google/gwt/user/UserAgent.gwt.xml file... Put it in a source location that is included BEFORE your gwt-*.jar on the classpath. Basically, you can copy that file into a new one in the same package as the original, and edit the CDATA Javascript block that returns the actual user.agent value. Play with this all you like, but don't go getting too crazy with their user.agent property, as it WILL be changing for ie8 in a future build.
对于较旧的gwt项目,您必须超级com / google / gwt / user / UserAgent.gwt.xml文件...将其放在包含在类路径上的gwt - * .jar之前的源位置。基本上,您可以将该文件复制到与原始文件相同的包中的新文件中,并编辑返回实际user.agent值的CDATA Javascript块。玩这个你喜欢的,但不要对他们的user.agent属性过于疯狂,因为它将在未来版本中改变ie8。
To target ie browsers, make up your own ie.version property, and tweak a copy of the property-provider in UserAgent.gwt.xml to target different versions of ie. Just make sure that when you use the custom property for deferred binding you do:
要定位ie浏览器,请构建自己的ie.version属性,并在UserAgent.gwt.xml中调整属性提供程序的副本以定位不同版本的ie。只需确保在使用自定义属性进行延迟绑定时,您可以:
Or you'll get ie7 + gecko/safari builds and other silly junk that will never be used.
或者你将获得ie7 + gecko / safari构建和其他永远不会被使用的愚蠢垃圾。
Note: Any code in a property-provider is loaded in the .nocache.js, and can be useful to preload images / css whilst the .cache.js payload is being downloaded.
Just add var __cached = new Image('Url To Compiled Image / Whatever you want to load');
注意:属性提供程序中的任何代码都加载到.nocache.js中,对于在下载.cache.js有效内容时预加载images / css非常有用。只需添加var __cached = new Image('Url To Compiled Image / Whatever you to loading');