DOM:document.compatMode
From MDC
Contents |
[edit] Summary
Indicates whether the document is rendered in Quirks mode or Strict mode.
[edit] Syntax
mode = document.compatMode
modeis a string containing "BackCompat" for Quirks mode or "CSS1Compat" for Strict mode.
[edit] Example
if (document.compatMode == "BackCompat") {
// use some quirky stuff
}
[edit] Notes
There is a third mode, Gecko's "Almost_Standards" Mode, which only differs from Strict mode in the layout of images inside table cells. This third mode is reported the same way as Strict mode: "CSS1Compat".
[edit] Specification
Not part of any standard.