Re: Starting a script block with <!--

On Sat, 20 Mar 2010 22:17:23 +0100, Herman Venter <hermanv@microsoft.com>  
wrote:
> I'm working on a prototype HTML5 parser for research purposes and  
> recently bumped into this little bit of markup:
>
> <SCRIPT type=text/javascript><!-- site js --></SCRIPT>
>
> Trawling around the Web it seems that the expectation is that the script  
> engine will ignore a (first?) line starting with <!--.
>
> The EcmaScript standard does not provide for this (at least not the last  
> time I've read through it), so I thought perhaps the issue will be  
> addressed in the new HTML5 standard.

We are hoping the ECMAScript guys will at some point address this. E.g.  
<!-- in an external ECMAScript file has the same effect, so it does not  
make much sense for the HTML5 specification to say something about it.

Meanwhile there is:  
http://wiki.whatwg.org/wiki/Web_ECMAScript#HTML_comments


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Sunday, 21 March 2010 21:11:49 UTC