Guest User

Untitled

a guest
Oct 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. _isValidFileDrag: function(e){
  2. var dt = e.dataTransfer,
  3. // do not check dt.types.contains in webkit, because it crashes safari 4
  4. isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
  5. console.log(dt);
  6.  
  7. // dt.effectAllowed is none in Safari 5
  8. // dt.types.contains check is for firefox
  9. return dt && dt.effectAllowed != 'none' &&
  10. (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
  11. }
  12.  
  13. // errors in ie9 undefined method at line with return character 9
Add Comment
Please, Sign In to add comment