Hi,
Looking around I noticed someone has already done the work:

http://e-syed.net/skriptlab/articles_doctype.htm

Now, they are concentrating on the difference in box model (borders in or
outside), but I think we'll need to know the strict status for other issues
as well, and also for NS6, so what about doing this:

this.strict=(document.compatMode=="CSS1Compat"||(document.doctype&&document.
doctype.name.indexOf(".dtd")==-1))?true:false;

This returns "true" for all browsers that have the strict/quirks switch, and
have a valid doctype.
Tested on PC, NS4 (returns false) , NS6, IE5.5(returns false), IE6, Mozilla.

What do you think?

Richard.




----- Original Message -----
From: "Stephan Tolksdorf" <[EMAIL PROTECTED]>
To: "Richard Bennett" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, October 14, 2001 10:10 PM
Subject: Re: [Dynapi-Dev] IE6 strict / quirks


> > I think we should strive to get everything working in "strict" mode, as
this
> > is more future-proof.
> > It should be possible to test for "strict", by adding this to
browser.js:
> >
> >     this.strict=(document.body.parentNode)?true:false
> >
> > (not tested though).
> > I would suggest adding a check like this, and copying the whole examples
> > directory into /examplesstrict/ so we have all examples with doctype for
> > "strict" testing, and still leaving the current examples directory
> > unchanged.
> >
> > What do you think?
>
> As I mentioned before this test is absolutely necessary for a DHTML
> library.
> If your test is reliable, it should be included. As I mentioned
> before, it is the absolute prerequisite for supporting IE6. But I
> haven't read about an "official" test for standards compliant mode
> yet...
>
> Stephan
>
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/

Reply via email to