ebidel/idb.filesystem.js — pull request #29 by jameslafa (2013-12-10 20:08:03+00:00)
Title: Add optimistic storage implemented in FF26

Firefox 26 is out today and added a new interesting feature :

*IndexedDB can now be used as a "optimistic" storage area so it doesn't require any prompts and data is stored in a pool with LRU eviction policy, in short temporary storage* [Bugzilla details](https://bugzilla.mozilla.org/show_bug.cgi?id=785884)

To use this new feature, we need to give an configuration object as argument instead of a version 1 when we execute `indexedDB.open`.

Because the syntax of the function has change from numeric to object, the new version is not compatible with the old one. In consequence, on a version prior to FF26, an TypeError exception will be thrown and then we can fallback to the previous way of opening indexedDB.

Every tests pass on FF25 and FF26.