Created
June 24, 2011 10:50
-
-
Save meleyal/1044572 to your computer and use it in GitHub Desktop.
Modernizr test for File API support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 509d6f93d51efaee274d267c030ac2855aa799d7 Mon Sep 17 00:00:00 2001 | |
From: meleyal <william.meleyal@gmail.com> | |
Date: Fri, 1 Apr 2011 00:25:34 +0200 | |
Subject: [PATCH] add test for File API support | |
--- | |
modernizr.js | 6 ++++++ | |
1 files changed, 6 insertions(+), 0 deletions(-) | |
diff --git a/modernizr.js b/modernizr.js | |
index 93366aa..0cbdf20 100644 | |
--- a/modernizr.js | |
+++ b/modernizr.js | |
@@ -716,6 +716,12 @@ window.Modernizr = (function(window,document,undefined){ | |
tests['applicationcache'] = function() { | |
return !!window.applicationCache; | |
}; | |
+ | |
+ | |
+ // Safari 5 supports most of the File API, but not FileReader | |
+ tests['fileapi'] = function(){ | |
+ return !!window.FileReader; | |
+ }; | |
// Thanks to Erik Dahlstrom | |
-- | |
1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment