daleharvey/pouchdb — pull request #379 by nick-thompson (2013-01-24 06:09:08+00:00)
Title: IDB Transaction Mode Chrome Canary

In Chrome Canary, the test suite fails on almost all of the "local-1" class tests because of a TypeError [here](https://github.com/daleharvey/pouchdb/blob/master/src/adapters/pouch.idb.js#L88) and [here](https://github.com/daleharvey/pouchdb/blob/master/src/adapters/pouch.idb.js#L366). This falls back to this line: https://github.com/daleharvey/pouchdb/blob/master/src/adapters/pouch.idb.js#L10.

Reading through the issues list I see that it's been dealt with before in #219 and #305, but the solution proposed in 305 (which is currently implemented on the master branch) fails on Chrome Canary (I'm running v26.0.1389.0 on OS X), because `window.IDBTransaction` is natively supported, but `IDBTransaction.READ_WRITE` is `undefined`.

I was able to get the test suite to pass just by replacing `IDBTransaction.READ_WRITE` with `'readwrite'` on each of the problematic lines pointed to above, but in one of the previous discussions about this issue, it was mentioned that firefox doesn't support the string literals. To address that, I ran the same suite in FF 18.0.1 with the `'readwrite'` literals, and everything checked out fine.

I can't speak for older versions of FF, and I don't know the status in other browsers, but I wanted to bring this issue up. Thoughts?