UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

19 lines (16 loc) 558 B
/*! { "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)); });