warn if IE8 is in compatibility mode

This commit is contained in:
Jon Hester 2015-03-05 13:48:28 +00:00
parent fa8961118a
commit a999ac1ac3
1 changed files with 10 additions and 0 deletions

View File

@ -113,6 +113,16 @@ if (__DEV__) {
}
}
// If we're in IE8, check to see if we are in combatibility mode and provide
// information on preventing compatibility mode
if (document.documentMode && document.documentMode < 8) {
console.debug(
'Internet Explorer is running in compatibility mode, please add the following ' +
'tag to your HTML to prevent this from happening: ' +
'<meta http-equiv="X-UA-Compatible" content="IE=edge" />'
);
}
var expectedFeatures = [
// shims
Array.isArray,