aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js')
-rw-r--r--vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js b/vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js
index 6e6ed9c27..d11ec1c5a 100644
--- a/vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js
+++ b/vendor/twbs/bootstrap/site/docs/4.5/assets/js/src/ie-emulation-modes-warning.js
@@ -11,6 +11,7 @@
if (groups === null) {
return null
}
+
var ieVersionNum = parseInt(groups[1], 10)
var ieMajorVersion = Math.floor(ieVersionNum)
return ieMajorVersion
@@ -24,9 +25,11 @@
if (typeof jscriptVersion === 'undefined') {
return 11 // IE11+ not in emulation mode
}
+
if (jscriptVersion < 9) {
return 8 // IE8 (or lower; haven't tested on IE<8)
}
+
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
}
@@ -34,14 +37,16 @@
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
return // Opera, which might pretend to be IE
}
+
var emulated = emulatedIEMajorVersion()
if (emulated === null) {
return // Not IE
}
+
var nonEmulated = actualNonEmulatedIEMajorVersion()
if (emulated !== nonEmulated) {
// eslint-disable-next-line no-alert
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
}
-}())
+})()