- From: Joe English <joe@trystero.art.com>
- Date: Wed, 24 Jul 1996 15:49:41 PDT
- To: www-html@w3.org
Jonsm@aol.com wrote: > In common practice I am seeing: > > <SCRIPT> > <!-- > write whatever you want here > --> > </SCRIPT> > > This has the advantage of removing the problems with CDATA and end tags. Not really. If the SCRIPT element has CDATA declared content, then <!-- is parsed as data, not the beginning of a comment declaration, so you have: <SCRIPT> <!-- put anything here except for an ETAGO delimiter-in-context. This still breaks: document.write("</H1>"); --> </SCRIPT> If the SCRIPT element has (#PCDATA) as its content model, then you have: <SCRIPT> <!-- put anything here except for a COM delimiter. Now this breaks: --counter; --> </SCRIPT> > It also ensure that the scripts will be invisible to older browsers. > It has the disadvantage of putting your scripts into comments. --Joe English joe@art.com
Received on Wednesday, 24 July 1996 18:49:54 UTC