Files
GPW/GPW_Admin/Scripts/src/utils/isIE.js
T
Samuele E. Locatelli cf3b0d9821 Update BOOTSTRAP alla 4!!!
2020-01-28 13:06:42 +01:00

22 lines
511 B
JavaScript

import isBrowser from './isBrowser';
const isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);
const isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);
/**
* Determines if the browser is Internet Explorer
* @method
* @memberof Popper.Utils
* @param {Number} version to check
* @returns {Boolean} isIE
*/
export default function isIE(version) {
if (version === 11) {
return isIE11;
}
if (version === 10) {
return isIE10;
}
return isIE11 || isIE10;
}