Skip to content

Instantly share code, notes, and snippets.

@du5rte
Last active Oct 26, 2016
Embed
What would you like to do?
Modernizr initializer
import './modernizr'
// Modernizr
// https://modernizr.com/docs
Modernizr.addTest('support', function() {
if (
Modernizr.svg &&
Modernizr.cssanimations &&
Modernizr.boxsizing &&
Modernizr.flexbox &&
Modernizr.mediaqueries &&
Modernizr.cssremunit &&
Modernizr.csstransforms &&
Modernizr.csstransitions
) { return true } else { return false }
})
////// CUSTOMIZE HERE //////////////////////////////////////////////////////////
if (Modernizr.support) {
console.info('Browser is Supported')
} else {
console.info('Browser is not Supported')
}
////////////////////////////////////////////////////////////////////////////////
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment