Skip to content

Instantly share code, notes, and snippets.

@du5rte
Last active October 26, 2016 18:01
Show Gist options
  • Save du5rte/22829b560cc273e94b0ee00a87dc9085 to your computer and use it in GitHub Desktop.
Save du5rte/22829b560cc273e94b0ee00a87dc9085 to your computer and use it in GitHub Desktop.
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