Skip to content

Instantly share code, notes, and snippets.

@kenoir
Created June 20, 2012 16:05
Show Gist options
  • Save kenoir/2960679 to your computer and use it in GitHub Desktop.
Save kenoir/2960679 to your computer and use it in GitHub Desktop.
Really simple js object for testing HTML5 browser capabilities
var Cheesewire = {
cutsTheMustard: function(){
if('querySelector' in document
&& 'localStorage' in window
&& 'addEventListener' in window) {
return true;
}
return false;
},
touchTheMustard: function(){
return !!('ontouchstart' in window) ? 1 : 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment