UNPKG

modernizr

Version:

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

24 lines (21 loc) 565 B
/*! { "name": "Drag & Drop", "property": "draganddrop", "caniuse": "dragndrop", "notes": [{ "name": "W3C spec", "href": "http://www.w3.org/TR/2010/WD-html5-20101019/dnd.html" }], "polyfills": ["dropfile", "moxie", "fileapi"] } !*/ /* DOC Detects support for native drag & drop of elements. */ define(['Modernizr', 'createElement'], function( Modernizr, createElement ) { Modernizr.addTest('draganddrop', function() { var div = createElement('div'); return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); }); });