Created
September 6, 2017 06:23
-
-
Save guidoschmidt/3849c13d1e1b3e098c5f90e0c300886c to your computer and use it in GitHub Desktop.
This file contains 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
const querySelectorAvailable = 'querySelector' in document; | |
const localStorageAvailable = 'localStorage' in window; | |
const eventListenerAvailable = 'addEventListener' in window; | |
if (querySelectorAvailable | |
&& localStorageAvailable | |
&& eventListenerAvailable) { | |
// Do your modern browser stuff | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment