In order to embrace modern web technologies we need to be able to provide fall backs for older browsers.
Right now in D7 all feature detection is hard-coded in specific JS files. Proposed resolution
Include Modernizr in core. What parts of Modernizr we choose to include is important. If we go too lightweight then we run the risk of hitting a brick wall because of inability to predict use cases. If we go too heavy then it adds way too much redundant overhead to page loads.
The proposal is to modularise Modernizr within Drupal. Recreating the functionality of the Modernizr production builder
If we want to fully embrace HTML5 and Responsive Design in Drupal 8 then we need Modernizr in core.
Modules and themes would be able to call hook_device_context() in order to load the specific parts of Modernizr that they require.
Original report by bayousoft