This lets web pages avoid unsupported features by informing the user their browser is not supported or loading a polyfill.
Modernizr aims to provide feature detection in a consistent and easy to use manner that discourages the use of failure-prone browser sniffing.
[citation needed] Modernizr determines whether the user's browser has implemented a given feature.
It also adds classes to the HTML element based on what features are and are not natively supported.
When it runs, it creates a global object called Modernizr that contains a set of Boolean properties for each feature it can detect.