mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-17 15:11:04 +00:00
19 lines
558 B
JavaScript
19 lines
558 B
JavaScript
/*!
|
|
{
|
|
"name": "IE8 compat mode",
|
|
"property": "ie8compat",
|
|
"authors": ["Erich Ocean"]
|
|
}
|
|
!*/
|
|
/* DOC
|
|
Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
|
|
*/
|
|
define(['Modernizr'], function(Modernizr) {
|
|
// In this case, IE8 will be acting as IE7. You may choose to remove features in this case.
|
|
|
|
// related:
|
|
// james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/
|
|
|
|
Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));
|
|
});
|