[gwt-contrib] Re: Make GWT template javascript suitable for XHTML

2010-08-04 Thread Henri
I created an issue based on the trunk of GWT, the url is
http://codereview.appspot.com/1873052

On Aug 2, 3:04 pm, Joel Webber j...@google.com wrote:
 The best way would be to upload a patch to http://
 gwt-code-reviews.appspot.com/ . That makes it much easier to understand the
 diffs.

 Le 1 août 2010 11:07, Henri hfman...@gmail.com a écrit :

  I updated function computeScriptBase() in IFrameTemplate.js to work
  with DOM javascript functions instead of document.write, which seems
  to work, and would like you to look at it. How can I send this file to
  you?

  On Jul 23, 3:17 pm, Joel Webber j...@google.com wrote:
   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 hfman...@gmail.com 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

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Make GWT template javascript suitable for XHTML

2010-08-02 Thread Joel Webber
The best way would be to upload a patch to http://
gwt-code-reviews.appspot.com/ . That makes it much easier to understand the
diffs.

Le 1 août 2010 11:07, Henri hfman...@gmail.com a écrit :

 I updated function computeScriptBase() in IFrameTemplate.js to work
 with DOM javascript functions instead of document.write, which seems
 to work, and would like you to look at it. How can I send this file to
 you?

 On Jul 23, 3:17 pm, Joel Webber j...@google.com wrote:
  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 hfman...@gmail.com 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


-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Make GWT template javascript suitable for XHTML

2010-08-01 Thread Henri
I updated function computeScriptBase() in IFrameTemplate.js to work
with DOM javascript functions instead of document.write, which seems
to work, and would like you to look at it. How can I send this file to
you?

On Jul 23, 3:17 pm, Joel Webber j...@google.com wrote:
 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 hfman...@gmail.com 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