Is a simple JavaScript module that determines whether or not the given browser is IE8.
npm install is-ie8 --save-dev
var isIE8 = require('is-ie8');
if(isIE8()){
// do something
}
// isIE8 | |
// | |
// Use: Determines whether or not the given browser is IE8 | |
// | |
// Returns: Boolean | |
// ------------------------------------------------------------ | |
module.exports = function isIE8(){ | |
if (document.all && !document.addEventListener) { | |
return true; | |
}else{ | |
return false; | |
} | |
} |
{ | |
"name": "is-ie8", | |
"version": "1.0.2", | |
"description": "Determines whether or not the given browser is IE8.", | |
"main": "is-ie8.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"homepage": "https://gist.github.com/5b6e559213280c365c4a", | |
"repository": { | |
"type": "git", | |
"url": "https://gist.github.com/5b6e559213280c365c4a.git" | |
}, | |
"keywords": [ | |
"ie8", | |
"browser", | |
"javascript", | |
"check", | |
"version" | |
], | |
"author": "Ryan Burgess <rburgess@evernote.com> (http://everernote.com/)", | |
"license": "MIT" | |
} |