From a999ac1ac30bd7ec9db152027fc480ea34652b5d Mon Sep 17 00:00:00 2001 From: Jon Hester Date: Thu, 5 Mar 2015 13:48:28 +0000 Subject: [PATCH] warn if IE8 is in compatibility mode --- src/browser/ui/React.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/browser/ui/React.js b/src/browser/ui/React.js index b5520a15f7..6c25411f6b 100644 --- a/src/browser/ui/React.js +++ b/src/browser/ui/React.js @@ -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: ' + + '' + ); + } + var expectedFeatures = [ // shims Array.isArray,