What are some good practices for loading a javascript conditional file using modernizr, now that yepnope and .load are deprecated in the latest version of modernizr.
Used to use the .load function. http://modernizr.com/docs/#load
Modernizr.load({ test: Modernizr.geolocation, yep : 'geo.js', nope: 'geo-polyfill.js' });
Now .load is deprecated with yepnope. https://github.com/SlexAxton/yepnope.js/
Link to the answer before yepnope becomes obsolete Loading scripts using Modernizr ... Doesn't work
ruby-on-rails-4 modernizr polyfills yepnope
Micfin
source share