Created
September 6, 2019 13:08
-
-
Save AndreiHondrari/b5245716737b3924216e06c2e1210d22 to your computer and use it in GitHub Desktop.
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 isIEBrowser() { | |
const userAgent = window.navigator.userAgent; | |
if (userAgent.includes("MSIE") || userAgent.includes("Trident")) | |
return true; | |
return false; | |
} | |
document.addEventListener('DOMContentLoaded', function(e) { | |
const isInternetExplorer = isIEBrowser(); | |
if (isInternetExplorer) { | |
console.warn("Internet Explorer browser detected !"); | |
// Do something about it... | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment