I noticed that the XSTemplate.js file is differs between 2.0 RC1 and
the trunk (specifically r7021). I am wondering what the implications
are.
In RC1, the XSTemplate.js (the cross-site linker template for the
selection/landing js file) loads the target js file with a
document.write("<script>...") command when I include the xs linker in
the module xml file.In the trunk, the same file loads the targeted js
file by creating a "script" element and injecting it in the document
via something like this:
scrpt.language = "javascript" ;
scrpt.setAttribute("language", "javascript");
scrpt.setAttribute("type", "text/javascript");
scrpt.charset="utf-8";
scrpt.src = base + strongName + '.cache.js';
window.document.getElementsByTagName("body")[0].appendChild(scrpt);
I think I prefer the latter implementation, but unfortunately the
latest trunk build won't compile in xs mode. The compilation produces
the following error:
Compiling 4 permutations
Compiling permutation 1...
Compiling permutation 2...
Compiling permutation 3...
Compiling permutation 4...
Compile of permutations succeeded
Linking into C:\Users\joconner\workspace\joconner_ree\ree_gwt
\ChatClient\war\chatclient
Invoking Linker Cross-Site
Attempting to optimize JS
[ERROR] Unable to parse JavaScript
com.google.gwt.dev.js.JsParserException: syntax error
at com.google.gwt.dev.js.JsParser$1.error(JsParser.java:107)
at com.google.gwt.dev.js.rhino.Context.reportError(Context.java:
459)....and so on
Any ideas on
1) whether the trunk method of injecting the application js is
preferred, and
2) why the trunk GWT doesn't compile with the xs linker. (My app is
just the default generated by the webAppCreator tool)
Regards,
John O.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=.