Created
February 4, 2015 15:32
-
-
Save msrafi/cb491396602e7a1dfdca to your computer and use it in GitHub Desktop.
Javascript: IE Detection
This file contains hidden or 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
var ie = (function (){ | |
if (window.ActiveXObject === undefined) return null; | |
if (!window.XMLHttpRequest) return 6; | |
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