Skip to content

Instantly share code, notes, and snippets.

@everdimension
Last active April 6, 2018 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save everdimension/98e1f40e4d5d903ab39e69dc1e3be837 to your computer and use it in GitHub Desktop.
Save everdimension/98e1f40e4d5d903ab39e69dc1e3be837 to your computer and use it in GitHub Desktop.
check for ie11
function isBrowserIE() {
const ie11Re = /Trident.*rv:11/;
const edgeRe = /Edge\//;
const ua = navigator.userAgent;
return ie11Re.test(ua) || edgeRe.test(ua);
}
function isBrowserIE11() {
return /Trident.*rv:11/.test(navigator.userAgent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment