| 1 |
import isBrowser from './isBrowser'; |
| 2 |
|
| 3 |
const isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); |
| 4 |
const isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); |
| 5 |
|
| 6 |
/** |
| 7 |
* Determines if the browser is Internet Explorer |
| 8 |
* @method |
| 9 |
* @memberof Popper.Utils |
| 10 |
* @param {Number} version to check |
| 11 |
* @returns {Boolean} isIE |
| 12 |
*/ |
| 13 |
export default function isIE(version) { |
| 14 |
if (version === 11) { |
| 15 |
return isIE11; |
| 16 |
} |
| 17 |
if (version === 10) { |
| 18 |
return isIE10; |
| 19 |
} |
| 20 |
return isIE11 || isIE10; |
| 21 |
} |