Last active
March 24, 2016 12:02
-
-
Save motss/c6f4f7d0c3baf14c2176 to your computer and use it in GitHub Desktop.
Feature detection for IEs
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
// http://stackoverflow.com/questions/10964966/detect-ie-version-prior-to-v9-in-javascript | |
// http://tanalin.com/en/articles/ie-version-js/ | |
var ie = (function (){ | |
if (window.ActiveXObject === undefined) return null; | |
if (!document.querySelector) return 7; | |
if (!document.addEventListener) return 8; | |
if (!window.atob) return 9; | |
if (!document.__proto__) return 10; | |
return 11; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment