Re: xhtml 2.0 noscript

* Mark Birbeck wrote:
>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.

Two originally identical things may be different after you change one of
them. Yes, that's trivially true, regardless of what triggers the change
(you can just use removeChild instead of document.write if you like). So
if this is supposed to explain

>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.

then you really argue that <script> execution should be delayed until
after the document has been fully transformed into a tree. As you do
not seem to argue that, your argument doesn't make sense. Further, you
just claim "we really need" this. We do not. And we do not have that
in many cases either. What you say is nothing but nonsense.

>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.

That is obviously incorrect, already for the fact that scripts other
than those inside <script> will have control passed to them before any
'load' event occurs, a trivial example being 

  <img onerror='...removeChild(this)' ... />

document.write is also not a property of XHTML, but of the HTML 4.01
and XHTML 1.0 Document Object Model, and yes, it does have the write
method for XHTML.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Saturday, 29 July 2006 14:06:41 UTC