Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 26, 2012
@cwilso cwilso Removing unnecessary "timeout" param from IDBDatabase.transaction
IDBDatabase.transaction no longer (as of 19 April 2011 version of spec)
has a third optional "timeout" param.  This is causing type errors in
Chrome; it's also unnecessary, as it will default to a UA-specific
@cwilso cwilso Insert, rather than push, new adapters
The old way of pushing adapters meant that you would have to forcibly
request any kind of provider other than the localStorage one with a
window-based fallback; you could not add other providers in order of
preference, for example, because if the code failed on the adapter
provided in options, it would just plain fail.  This change allows the
user to set up a preferred-order list, ending with localStorage and
@brianleroux Merge pull request #92 from cwilso/master
Removed IDBDatabase.transaction timeout param - causing type errors in Chrome.
Showing with 3 additions and 2 deletions.
  1. +2 −1 src/Lawnchair.js
  2. +1 −1 src/adapters/indexed-db.js
3 src/Lawnchair.js
@@ -78,7 +78,8 @@ Lawnchair.adapter = function (id, obj) {
if (indexOf(implementing, i) === -1) throw 'Invalid adapter! Nonstandard method: ' + i
// if we made it this far the adapter interface is valid
- Lawnchair.adapters.push(obj)
+ // insert the new adapter as the preferred adapter
+ Lawnchair.adapters.splice(0,0,obj)
Lawnchair.plugins = []
2 src/adapters/indexed-db.js
@@ -68,7 +68,7 @@ Lawnchair.adapter('indexed-db', (function(){
var self = this;
var win = function (e) { if (callback) { obj.key =; self.lambda(callback).call(self, obj) }};
- var trans = this.db.transaction(["teststore"], webkitIDBTransaction.READ_WRITE, 0);
+ var trans = this.db.transaction(["teststore"], webkitIDBTransaction.READ_WRITE);
var store = trans.objectStore("teststore");
var request = obj.key ? store.put(obj, obj.key) : store.put(obj);

No commit comments for this range

Something went wrong with that request. Please try again.