superfeedr / indexeddb-backbonejs-adapter

An indexedDB adapter for Backbonejs
http://blog.superfeedr.com/indexeddb-backbonejs-adapter/
MIT License
248 stars 61 forks source link

remove prefixed indexedDB fallbacks #66

Closed zawaideh closed 10 years ago

zawaideh commented 10 years ago

I am sending this in as a way to discuss this.

I believe the decision to fall back on prefixed implementions of indexedDB should be left to the user of the library. In this case it could be suggested that they do the renaming of the prefixed before loading any of the other scripts:

     var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB ;
     var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || { READ_WRITE: "readwrite" }; // No prefix in moz
     var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange ; // No prefix in moz

     window.IDBCursor = window.IDBCursor || window.webkitIDBCursor ||  window.mozIDBCursor ||  window.msIDBCursor ;

// --> load backbone-indexeddb here

Browser support: http://caniuse.com/indexeddb