W3C home > Mailing lists > Public > www-html@w3.org > November 2007

Re: html code in <script>

From: David Dorward <david@dorward.me.uk>
Date: Wed, 14 Nov 2007 09:23:53 +0000
Message-Id: <F07D2BC4-47D0-4829-82DC-A0FFE8CA5DB4@dorward.me.uk>
To: www-html@w3.org

On 13 Nov 2007, at 21:03, David Woolley wrote:
> By the way, I am pretty sure that document.write on the currently  
> loading document is not permitted in XHTML.

I believe that is just the state of current browser implementations,  
rather then anything mandated by the spec. The suggestion from  
various messages from people working for browser vendors suggests  
that adding support for document.write in XML mode is hard and likely  
won't happen.

document.write is generally considered to be less then best practise  
anyway, with DOM manipulation being preferred.

> My advise would be to revert to HTML 4.01 and use HTML comments to  
> protect the scripts against earlier browsers.

I'd generally try to move things to external scripts so they can be  
cached separately.

>   Many people think that Appendix C (serving XHTML as text/html)  
> was a bad idea; it relies on certain non-compliances that are  
> common in text/html browsers.

It also has a few issues, mostly focusing on lack of clarity. It was  
entered into the working group's issue tracking system a week short  
of a year ago today with the intention being to produce some errata.  
That doesn't seem to have come to anything yet though. Does anyone  
know what the status of that is?

-- 
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Received on Wednesday, 14 November 2007 09:37:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:12 GMT