Skip to content

Instantly share code, notes, and snippets.

@xyqfer
Created October 2, 2013 01:40
Show Gist options
  • Save xyqfer/6787900 to your computer and use it in GitHub Desktop.
Save xyqfer/6787900 to your computer and use it in GitHub Desktop.
检测 drag and drop
tests['draganddrop'] = function() {
var div = document.createElement('div');
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment