backbone-indexeddb
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -12,23 +12,24 @@ (function () { /*global _: false, Backbone: false */ | ||
if(typeof exports == 'undefined'){ | ||
// Naming is a mess! | ||
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB ; | ||
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction; // No prefix in moz | ||
var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange ; // No prefix in moz | ||
/* Horrible Hack to prevent ' Expected an identifier and instead saw 'continue' (a reserved word).'*/ | ||
if (window.indexedDB) { | ||
indexedDB.prototype._continue = indexedDB.prototype.continue; | ||
} else if (window.webkitIDBRequest) { | ||
webkitIDBRequest.prototype._continue = webkitIDBRequest.prototype.continue; | ||
} | ||
window.indexedDB = indexedDB; | ||
window.IDBCursor = window.IDBCursor || window.webkitIDBCursor || window.mozIDBCursor || window.msIDBCursor ; | ||
} | ||
else { | ||
if(typeof exports !== 'undefined'){ | ||
_ = require('underscore'); | ||
Backbone = require('Backbone'); | ||
} | ||
// Naming is a mess! | ||
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB ; | ||
var IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction; // No prefix in moz | ||
var IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange ; // No prefix in moz | ||
/* Horrible Hack to prevent ' Expected an identifier and instead saw 'continue' (a reserved word).'*/ | ||
if (window.indexedDB) { | ||
indexedDB.prototype._continue = indexedDB.prototype.continue; | ||
} else if (window.webkitIDBRequest) { | ||
webkitIDBRequest.prototype._continue = webkitIDBRequest.prototype.continue; | ||
} | ||
window.indexedDB = indexedDB; | ||
window.IDBCursor = window.IDBCursor || window.webkitIDBCursor || window.mozIDBCursor || window.msIDBCursor ; | ||
// Driver object | ||
@@ -35,0 +36,0 @@ // That's the interesting part. |
@@ -5,3 +5,3 @@ { | ||
"description": "An backbone adapter for indexeddb. Useless for most people untile indexeddb is ported to the browser", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
289672
3963