Loading ...
Sorry, an error occurred while loading the content.

HTML Comments

Expand Messages
  • Douglas Crockford
    HTML Comments do not work the way a reasonable person would expect because they are overloaded onto meta declarations. The full powerful of this syntax is
    Message 1 of 1 , Jun 14, 2009
    View Source
    • 0 Attachment
      HTML Comments do not work the way a reasonable person would expect because they are overloaded onto meta declarations. The full powerful of this syntax is employed primarily by miscreants.

      JSLint now enforces restrictions on these comments and meta declarations that should conform to reasonable expectations. The body of a comment cannot contain -- or <! and meta declarations cannot contain --.

      I am reviewing the possibility that JSLint should not tolerate the <! > meta declarations at all and permit only the restricted <!-- --> comments.

      As always, JSLint does not like to see

      <script>
      <!--

      // -->
      </script>

      This ugly hack was needed briefly 14 years ago. If you are not supporting Ajax applications on Mosaic or Netscape 1, then you do not need it.
    Your message has been successfully submitted and would be delivered to recipients shortly.