W3C home > Mailing lists > Public > www-html@w3.org > July 2006

Re: xhtml 2.0 noscript

From: Jim Ley <jim@jibbering.com>
Date: Sat, 29 Jul 2006 15:02:12 +0100
To: www-html@w3.org
Message-ID: <eafpp3$vts$1@sea.gmane.org>

"Mark Birbeck" <mark.birbeck@x-port.net> wrote in message 
> The issue *is* an XML one.
> document.write() is normally carried out as the document is loading,
> by interspercing <script> elements within the normal mark-up. This
> means that the *initial* document at the point of completion of the
> 'onload' event could be different when running in a browser with
> script, and one without.

Which is no problem, and applies as much to an HTML document as an XML one.

> But with XML we really need to have the document fully loaded and
> parsed before we can start manipulating it, which means that
> document.write() doesn't mean anything.

I don't see why we need that, indeed requiring it would prevent all sorts of 
things that are required on the web today - progressive rendering for 
example - a requirement in SVG for example.

> So if XHTML doesn't have document.write(), then that means that
> whatever mark-up you put into the body of your document you can
> guarantee it will be the same after the 'onload' event regardless of
> whether the browser has script turned on or off, or doesn't even
> support script.

No you don't, there is no such safety in XHTML today:

As an example, the following is not disallowed:

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<script type="text/javascript">
var el=document.createElementNS('http://www.w3.org/1999/xhtml','title');

Indeed, it works in current XHTML user agents.

That doesn't change the fact that xhtml2 really doesn't need a noscript - it 
was a mistake in previous versions.


Received on Saturday, 29 July 2006 14:03:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:13 UTC