We've tried to get rid of the document.write() tricks before, but with no success. There's always some squirrely case that crops on (especially on IE) that's forced us to put them back in. There are also a couple of specific corner cases that rely on document.write(), which would need to be preserved: 1. computeScriptBase() uses it to find the "current" script element, so it can compute the base url from which it was loaded. 2. It's used to determine when script injection (i.e., <script> tags referenced in the .gwt.xml file) is done.
The above two cases are probably impossible to solve without document.write(), though I'm certainly open to ideas. Assuming that's correct, it would mean you'd have to remove automatic script base detection and disable script injection. As much as I'd like to do that, we can't do so without breaking many existing apps. If you really must have XHTML support (something I've never found any actual utility in personally), then probably the better approach would be to design a different linker for it that explicitly removes the above features. Le 22 juillet 2010 05:28, Henri <[email protected]> a écrit : > Hello, > > Currently the template javascript files IFrameTemplate.js, > SingleScriptTemplate.js, and XSTemplate.js in com/google/gwt/core/ > linker and HostedModeTemplate.js in com/google/gwt/core/ext/linker/ > impl use document.write to manipulate the HTML page. This is not > allowed in XHTML. I changed IFrameTemplate.js so it now uses > equivalent DOM statements instead and that is working. XHTML documents > are useful since one can use embedded SVG and MathML. > > If you are interested I can send the modified IFrameTemplate.js to you > to check out if I did it the right way. Then we can update the other > template javascript files. > > Hope to hear from you! > > Kind regards, > > Henri Manson > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
