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

Re: [jslint] JSLinting HTML document with HTML comment at start

Expand Messages
  • cse_html_validator
    ... Thanks for the information on using comments before the DOCTYPE. However, it seems there is no solution to this if one decides they want or need to use
    Message 1 of 7 , Jan 31, 2012
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Rob Richardson" <erobrich@...> wrote:
      >
      > A comment before the DOCTYPE sends all versions of IE into quirks mode,
      > defeating the purpose of the doctype you've specified. See
      > http://stackoverflow.com/questions/941100/can-html-comments-appear-before-th
      > e-doctype-declaration Move the DOCTYPE line above the comment and you'll be
      > fine. It's unfortunate the error message doesn't include this clarity.
      >
      > Rob

      Thanks for the information on using comments before the DOCTYPE.

      However, it seems there is no solution to this if one decides they want or need to use comments before the DOCTYPE? Is there anyway to tell JSLint to accept it?

      Albert
    • cse_html_validator
      Also, what if the comment is a server macro or something that will be processed by the server so it doesn t show up to the end user? Is JSLint useless for this
      Message 2 of 7 , Jan 31, 2012
      • 0 Attachment
        Also, what if the comment is a server macro or something that will be processed by the server so it doesn't show up to the end user? Is JSLint useless for this case? I would hope not.


        >
        > Thanks for the information on using comments before the DOCTYPE.
        >
        > However, it seems there is no solution to this if one decides they want or need to use comments before the DOCTYPE? Is there anyway to tell JSLint to accept it?
        >
        > Albert
        >
      • Sean Kelly
        Personally, I prefer to fix my code to follow JSLint s recommendations. That said, I also put all my Javascript in .js files and include them using script tags
        Message 3 of 7 , Feb 1, 2012
        • 0 Attachment
          Personally, I prefer to fix my code to follow JSLint's recommendations.
          That said, I also put all my Javascript in .js files and include them using
          script tags so JSLint does not check my HTML, it checks my JavaScript.

          SeanK

          On Tue, Jan 31, 2012 at 3:47 PM, cse_html_validator <alhome@...>wrote:

          > **
          >
          >
          >
          > Also, what if the comment is a server macro or something that will be
          > processed by the server so it doesn't show up to the end user? Is JSLint
          > useless for this case? I would hope not.
          >
          > >
          > > Thanks for the information on using comments before the DOCTYPE.
          > >
          > > However, it seems there is no solution to this if one decides they want
          > or need to use comments before the DOCTYPE? Is there anyway to tell JSLint
          > to accept it?
          > >
          > > Albert
          > >
          >
          >
          >


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.