Created
October 22, 2018 14:38
-
-
Save wiseoldman/084b8552a1181b49981a7ba36f3e211c to your computer and use it in GitHub Desktop.
[Internet Explorer check] Check if the browser is Internet Explorer #ie #fallback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function is_ie() { | |
const UA = window.navigator.userAgent; | |
const MS_IE = UA.indexOf("MSIE "); | |
if (MS_IE > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)) { | |
return true; | |
} | |
return false; | |
} | |
module.exports = { is_ie }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment