Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 7th, 2012  |  syntax: None  |  size: 0.55 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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