Document.compatMode
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.
Document.compatMode
속성은 문서 렌더링을 호환 모드에서 진행했는지, 표준 모드에서 진행했는지 나타냅니다.
구문
js
const mode = document.compatMode;
값
다음 중 하나.
- 문서가 호환 모드이면
"BackCompat"
- 문서가 호환 모드가 아니거나("표준") 제한적 호환("거의 표준") 모드이면
"CSS1Compat"
참고 : 위의 모든 모드는 표준화됐으므로, 오래 전에 사용하던 "표준"과 "거의 표준"이라는 이름은 말이 되지 않아 이제 사용하지 않습니다.
예제
js
if (document.compatMode == "BackCompat") {
// in Quirks mode
}
명세서
Specification |
---|
DOM # ref-for-dom-document-compatmode① |
브라우저 호환성
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.