Tuesday, May 21, 2013

Check for the various File API support in Chrome and Firefox

At some point you might want to check to see if your browser supports HTML5 file API's. The code below will show you how. The video below will show you how to run the code in the console window for Chrome and Firefox.

<!doctype html>
<html lang="en">

function checkFileApi()
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
console.log('Great success! All the File APIs are supported.');
} else {
console.log('The File APIs are not fully supported in this browser.');


No comments:

Post a Comment