Re: html code in <script>

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 UTC