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

1143Re: [jslint] no comments before html root element?

Expand Messages
  • Mark Volkmann
    Feb 12, 2010
    • 0 Attachment
      On Fri, Feb 12, 2010 at 5:56 AM, Cheney, Edward A SSG RES USAR USARC <
      austin.cheney@...> wrote:

      > Yes, putting anything, except whitespace characters, alters how several
      > browsers perceive rendering of the DOM. This is most noticable in IE with
      > regard to complicated CSS processing, but can be noticed in other browsers
      > under certain circumstances. Here is a good example:
      > http://www.travelocity.com/mediakit/index.html
      > That code is standards compliant and uses the transitional doctype. It can
      > support up to XHTML 1.0 Strict immediately and XHTML 1.1 with the removal of
      > the "lang" attribute and changing the mime type in both the document head
      > and the HTTP header. The code can be executed locally if an absolute URI is
      > supplied for the CSS source. Put a comment in various strange places into
      > the code and reload it locally to see if the page is rendered differently.
      > Please keep in mind this is simple code containing a few elements and a
      > limited heirarchy. The results are different when the DOM becomes more
      > complicated in either variety and/or heirarchy. I have not tested scripted
      > response to the altered DOM rendering. I would guess, I have not tested this
      > at all, that reading from the DOM would be lesser altered that supplying to
      > the DOM using DOM methods.
      I wish you were able to provide a simple example and tell me exactly what I
      should see that is wrong in a specific browser. I'd gladly drop this
      discussion and be in favor of the current JSLint restriction if you could do

      > Since comments are nodes in the DOM it only seems logic that they should
      > not exist prior to the root element or after the root's closing element if
      > to be logically referenced in an automated scheme without reliance on an ad
      > hoc approach.
      Why do you feel that is logical? The root element is a child of the DOM
      Document object. Comments before or after the root element are children of
      the DOM Document object.

      R. Mark Volkmann
      Object Computing, Inc.

      [Non-text portions of this message have been removed]
    • Show all 22 messages in this topic