Skip to content

Instantly share code, notes, and snippets.

@micmath
Forked from tmaslen/gist:1103967
Created July 25, 2011 11:53
Show Gist options
  • Save micmath/1103970 to your computer and use it in GitHub Desktop.
Save micmath/1103970 to your computer and use it in GitHub Desktop.
function ctm() { var u = 'undefined'; return ((typeof document.querySelector !== u) && (typeof localStorage !== u) && (typeof window.addEventListener !== u)) ? true : false;}
function ctm() {var u='undefined';return typeof document.querySelector!==u && typeof localStorage!==u && typeof window.addEventListener!==u ? true:false;}
function ctm(){return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ? true:false}
function ctm(){try{return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window ? true:false;}catch(){return false}}
function ctm(){return 'querySelector' in document && 'localStorage' in window && 'addEventListener' in window}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment