I am writing an application that's supposed to support HTML5 drag/drop API for file, much like the on described here.
I would like to perform a programmatic check on whether the browser support this kind of madness :)
A solution that works for now is checking whether the browser provides a FileReader class, like this:
if (typeof(FileReader) == "undefined") {
$("#dropbox").hide();
} else {
// connect events
$("#filebox").hide();
}
But it is obviously not a correct one (I don't use that class at all).
Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…