Skip to content

Commit

Permalink
Moving draganddrop test into feature-detects/draganddrop.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rupl committed Sep 21, 2012
1 parent d9b6473 commit 0efde41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 7 additions & 0 deletions feature-detects/draganddrop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

// http://dev.w3.org/html5/spec/dnd.html

Modernizr.addTest('draganddrop', function () {
var div = document.createElement('div');
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
});
5 changes: 0 additions & 5 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,6 @@ window.Modernizr = (function( window, document, undefined ) {
* -----
*/

tests['draganddrop'] = function() {
var div = document.createElement('div');
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
};

// FF3.6 was EOL'ed on 4/24/12, but the ESR version of FF10
// will be supported until FF19 (2/12/13), at which time, ESR becomes FF17.
// FF10 still uses prefixes, so check for it until then.
Expand Down

0 comments on commit 0efde41

Please sign in to comment.