Is there a way to perform all Modernizr tests all at once?
It turns out that all the tests are stored as booleans directly in the Modernizr
object, so if you're building an application with a lot of feature dependencies and you want to test them all at once, use this:
var supported = true;
for (var feature in Modernizr) {
if (typeof Modernizr[feature] === "boolean" && Modernizr[feature] == false) {
supported = false;
break;
}
}