Skip to content

Commit

Permalink
Added test for File API
Browse files Browse the repository at this point in the history
  • Loading branch information
rzurad committed May 24, 2011
1 parent c129f07 commit 18cbc20
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,18 @@ window.Modernizr = (function( window, document, undefined ) {
return Modernizr['touch'];
};

/**
* file tests for the File API specification
* Tests for objects specific to the File API W3C specification without
* being redundant (don't bother testing for Blob since it is assumed
* to be the File object's prototype.
*
* Will fail in Safari 5 due to its lack of support for the standards
* defined FileReader object.
*/
tests['file'] = function() {
return !!(window.File && window.FileList && window.FileReader);
};

/**
* geolocation tests for the new Geolocation API specification.
Expand Down

0 comments on commit 18cbc20

Please sign in to comment.