1143Re: [jslint] no comments before html root element?
- Feb 12, 2010On Fri, Feb 12, 2010 at 5:56 AM, Cheney, Edward A SSG RES USAR USARC <
>I wish you were able to provide a simple example and tell me exactly what I
> 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:
> 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.
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 shouldWhy do you feel that is logical? The root element is a child of the DOM
> 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.
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]
- << Previous post in topic Next post in topic >>