Files
MoonPro.net/MP-ADM/Scripts/src/utils/isIE.js
T
Samuele E. Locatelli 91ccb018af Code cleanup con CodeMaid
2020-09-11 12:45:52 +02:00

21 lines
528 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;
}