axemclion / jquery-indexeddb

An IndexedDB Plugin for Jquery.
Other
195 stars 71 forks source link

Load libraty on browser without indexedDB support #69

Open faiwer opened 8 years ago

faiwer commented 8 years ago

Some browsers has not support of IndexedDB. It's Ok. But I can't load this libraty without error.

Example, IE9: img_11_02_15 20 56_454af9edaef

Currently I'm using string-replace plugin for grunt with this options:

ie8IndexedDB: {
    options: {
        replacements: [{
            pattern: '(',
            replacement: '(window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB) && ('
        }]
    },
    files: {"lib/jquery-indexeddb/jquery.indexeddb.js.ie8": "lib/jquery-indexeddb/jquery.indexeddb.js"}
},

I think better do that in libraty.

axemclion commented 8 years ago

This looks good. if you can send in a pull request, I can merge it in.