Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _isValidFileDrag: function(e){
- var dt = e.dataTransfer,
- // do not check dt.types.contains in webkit, because it crashes safari 4
- isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
- console.log(dt);
- // dt.effectAllowed is none in Safari 5
- // dt.types.contains check is for firefox
- return dt && dt.effectAllowed != 'none' &&
- (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files')));
- }
- // errors in ie9 undefined method at line with return character 9
Add Comment
Please, Sign In to add comment