This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Hi. I wanted to use on my page: <script type="text/javascript"> <!-- var index = 10; index--; //--> </script> From SGML parser I got this error on line where index-- is: invalid comment declaration: found character ";" outside comment but inside comment declaration Of course I can use index=index-1; or index-=1; but I like to use index--;
You cannot do that, comments in XML documents must not include "--". Please also see http://www.w3.org/TR/xhtml1/#C_4 you cannot use <!-- ... --> in <script> elements in XHTML documents at all, user agents must ignore the content of <!-- ... --> so your scripts won't work when the document is processed as XML.