Document: compatMode-Eigenschaft
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Die Document.compatMode
schreibgeschützte Eigenschaft zeigt an, ob das Dokument im Quirks-Modus oder im Standards-Modus gerendert wird.
Wert
Ein String, der einer der folgenden ist:
"BackCompat"
, wenn sich das Dokument im Quirks-Modus befindet."CSS1Compat"
, wenn sich das Dokument im No-Quirks-Modus (auch als "Standards" bekannt) oder im Limited-Quirks-Modus (auch als "Almost Standards" bekannt) befindet.
Hinweis: All diese Modi sind jetzt standardisiert, daher sind die älteren Bezeichnungen "Standards" und "Almost Standards" unsinnig und werden in Standards nicht mehr verwendet.
Beispiele
js
if (document.compatMode === "BackCompat") {
// in Quirks mode
}
Spezifikationen
Specification |
---|
DOM # ref-for-dom-document-compatmode① |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
compatMode |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.