Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<html>
<head>
<title>Quirk Mode Test for Safari 2.0.x and other old browsers</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script type="text/javascript">
// adapted from http://code.google.com/p/doctype/wiki/ArticleCompatMode
document.compatMode || (document.compatMode =
(function() {
var el; (el = document.createElement('div')).style.width = 1;
return el.style.width == '1px' ? 'BackCompat' : 'CSS1Compat';
})());
document.write('<p>' + document.compatMode + '</p>');
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment