Permalink
Browse files

simplification of some of addy's new tests in #419

  • Loading branch information...
1 parent dc05aa2 commit 51b9d73a1d28ad1967eb3aa4c5b9494a14165867 @paulirish paulirish committed Dec 4, 2011
@@ -1,4 +1,4 @@
// contentEditable
// http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#contenteditable
// by Addy Osmani
-Modernizr.addTest('contenteditable', !!('isContentEditable' in document.createElement('span')));
+Modernizr.addTest('contenteditable', 'isContentEditable' in document.documentElement);
@@ -1,4 +1,4 @@
// classList
// https://developer.mozilla.org/en/DOM/element.classList
// By Addy Osmani
-Modernizr.addTest('classlist', !!('classList' in document.createElement('a')));
+Modernizr.addTest('classlist', 'classList' in document.documentElement);
@@ -1,4 +1,4 @@
// <output>
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element
// by Addy Osmani
-Modernizr.addTest('output', !!('value' in document.createElement('output')));
+Modernizr.addTest('output', 'value' in document.createElement('output'));
@@ -1,4 +1,4 @@
// <time> element
// http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#the-time-element-0
// by Addy Osmani
-Modernizr.addTest('time', !!('valueAsDate' in document.createElement('time')));
+Modernizr.addTest('time', 'valueAsDate' in document.createElement('time'));
@@ -3,4 +3,4 @@
// Note: this feature detection test has been confirmed with the developers
// of the GamePad API implementation in FF
// By Addy Osmani
-Modernizr.addTest('gamepad', !!('gamepads' in navigator));
+Modernizr.addTest('gamepad', 'gamepads' in navigator);

0 comments on commit 51b9d73

Please sign in to comment.