问题
What are the possible checks can be made to detect firefox features using modernizr?
回答1:
Browser detection is unfortunately still necessary for things like video and audio since all browsers promote different formats. I think you'll find your answer here, Natto:
http://diveintohtml5.info/detect.html
回答2:
Even if browser detection is not recommended for features it could be use to present other type of information.
Modernizr.addTest('firefox', function () {
return !!navigator.userAgent.match(/firefox/i);
});
This adds a class .firefox to document.documentElement (html tag)
来源:https://stackoverflow.com/questions/11318389/modernizr-checks-to-detect-firefox