Skip to content

Commit

Permalink
more clarity around web sql database's need to create a dummy db
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jul 8, 2010
1 parent 6bf64be commit 0178be0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,13 @@ window.Modernizr = (function(window,doc,undefined){

// in chrome incognito mode, openDatabase is truthy, but using it
// will throw an exception: http://crbug.com/42380
// we create a dummy database. there is no way to delete it afterwards. sorry.
tests[websqldatabase] = function() {
var result = !!window.openDatabase;
if (result){
try {
result = !!openDatabase("testdb", "1.0", "html5 test db", 200000);
} catch(err) {
result = !!openDatabase( mod + "testdb", "1.0", mod + "testdb", 2e4);
} catch(e) {
result = false;
}
}
Expand Down

0 comments on commit 0178be0

Please sign in to comment.