Skip to content

Instantly share code, notes, and snippets.

@saikat
Created January 12, 2011 02:09
Show Gist options
  • Save saikat/775561 to your computer and use it in GitHub Desktop.
Save saikat/775561 to your computer and use it in GitHub Desktop.
var theClass = [self class],
dragEnterEventImplementation = class_getMethodImplementation(theClass, @selector(fileDraggingEntered:)),
dragEnterEventCallback = function (anEvent) {
if (![self validateDraggedFiles:anEvent.dataTransfer.files])
{
return NO;
}
else
{
anEvent.dataTransfer.dropEffect = "copy";
anEvent.stopPropagation();
dragEnterEventImplementation(self, nil, anEvent);
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment