Skip to content

Instantly share code, notes, and snippets.

@ryanburgess
Last active August 29, 2015 14:12
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 ryanburgess/5b6e559213280c365c4a to your computer and use it in GitHub Desktop.
Save ryanburgess/5b6e559213280c365c4a to your computer and use it in GitHub Desktop.
Determines whether or not the given browser is IE8.

Is IE8

Is a simple JavaScript module that determines whether or not the given browser is IE8.

Install

npm install is-ie8 --save-dev

Use

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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment