views:

8

answers:

0

Trying to detect if files property is supported in DataTransfer Object using Javascript. The following code causes an "Uncaught ReferenceError: DataTransfer is not defined" in Chrome, but IE, Firefox and Safari are all fine.

My code is:

if ("files" in DataTransfer.prototype) {
    alert("supported");
}

Any idea why or an alternative way to determine if the files property is supported?

Thanks