On Fri, Oct 31, 2008 at 2:21 PM, Nigel Tao <[EMAIL PROTECTED]> wrote:
> How about context.dataTypes being an array of strings, so you can go
>
> if (arrayContains(context.dataTypes, 'files')) {
> // do something with context.files
> }
> if (arrayContains(context.dataTypes, 'addressBookEntries')) {
> // do something with context.addressBookEntries
> }
On second thought, that's kinda dumb, since you can just do
if (context.files) {
// do something with context.files
}
if (context.addressBookEntries) {
// do something with context.addressBookEntries
}
So we could just say that context.files may be undefined, if there is
no file data (but there is other, non-file, data), and stipulate that
the ondrop callback should do something like
if (!context.files) { return; }
if it only handles file data.