How to detect browser support for File Api and drag and drop with javascript

Here’s a bit of info for you crazy HTML5 kids. You’ll need to include the handy Modernizr script for it to work.

var browserIsSupported = !!window.FileReader && Modernizr.draganddrop;
If you want see it in action, just visit stolencamerafinder 😉
I’ve tested this in Firefox 3.6, Chrome 10, IE8, Safari 5 and Opera 11. The only browsers from that list to support FileReader from the File API and the drag and drop events are FF and Chrome.
Let’s hope the other catch up soon…

6 thoughts on “How to detect browser support for File Api and drag and drop with javascript”

  1. The only browsers from that list to support FileReader from the File API and the drag and drop events if FF and Chrome.

    I’m not sure which is worse; that fact that you can’t spell “is”, or that fact that you’re trying to use it where “are” is required.

    Your loyal readership,
    etc, etc….

  2. Oh the shame. Thanks for letting me know.

    I thought you’d have something to say about using old versions of Firefox and IE.

    Er, I’ve just noticed I’ve written “Chorme 10”, hah, you didn’t spot that one!

  3. Have you ever considered writing an ebook or guest authoring on other sites? I have a blog based upon on the same topics you discuss and would really like to have you share some stories/information. I know my visitors would appreciate your work. If you’re even remotely interested, feel free to send me an email.|

Leave a Reply to matt Cancel reply

Your email address will not be published. Required fields are marked *