- From: David Dorward <david@dorward.me.uk>
- Date: Fri, 5 Feb 2010 07:25:51 +0000
- To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Cc: www-validator@w3.org
On 5 Feb 2010, at 03:56, Leif Halvard Silli wrote: > David Dorward, Mon, 1 Feb 2010 10:51:16 +0000: > >> ... or you could just use a JS comment rather than depending on hacks >> designed to avoid having Netscape 2 and friends render JS as text >> (which would break if the script was placed in an external file). > > The Netscape hack comes in handy, to save HTML4 from itself! The two > examples below validates both as XHTML and HTML4 - and at the same time > they eliminate the need for end tag escaping in HTML4. It is hideous. 1. From an aesthetic point of view, it is just an ugly mass of code 2. It depends on browsers implementing HTML 4.01 incorrectly in order to work 3. It throws warnings in the validator 4. It stops being valid HTML 4.01 as soon as the script contains the sequence -- e.g. for (var i = foo.length - 1; i >= 0; i--) { -- David Dorward http://dorward.me.uk
Received on Friday, 5 February 2010 07:26:36 UTC