Skip to content

Commit

Permalink
Update IndexedDB test. Skip testing prefix_indexedDB as FF dropped th…
Browse files Browse the repository at this point in the history
…at approach in FFb9.

It never shipped in a non-beta version of FF.
  • Loading branch information
paulirish committed Mar 29, 2011
1 parent 7b27f96 commit 3f51a06
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,18 +370,17 @@ window.Modernizr = (function(window,document,undefined){
return result;
};

// Vendors have inconsistent prefixing with the experimental Indexed DB:
// - Firefox is shipping indexedDB in FF4 as moz_indexedDB
// Vendors had inconsistent prefixing with the experimental Indexed DB:
// - Webkit's implementation is accessible through webkitIndexedDB
// We test both styles.
// - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB
// For speed, we don't test the legacy (and beta-only) indexedDB
tests['indexedDB'] = function(){
for (var i = -1, len = domPrefixes.length; ++i < len; ){
var prefix = domPrefixes[i].toLowerCase();
if (window[prefix + '_indexedDB'] || window[prefix + 'IndexedDB']){
if (window[ domPrefixes[i].toLowerCase() + 'IndexedDB']){
return true;
}
}
return false;
return !!window.indexedDB;
};

// documentMode logic from YUI to filter out IE8 Compat Mode
Expand Down

0 comments on commit 3f51a06

Please sign in to comment.