mozilla/localForage — pull request #99 by nantunes (2014-03-09 23:51:29+00:00)
Title: Added initStorage to driver's API. Only creates websql database if really needed.

WebSQL "localforage" database and respective table were always being created, even when using other driver.

The initStorage() function mechanism allows for similar behavior in other drivers, if needed.

An alternative could be to add a withStore to websql.js, similar to the one in indexeddb.js.
However, I think this is a better solution as it cuts the overhead of checking if db == null in every method call.

LocalStorage driver needs no initialization, so initStorage simply does nothing.

Note: This pull request replaces "Create websql database only if really needed" #79, as I forgot to create a new feature branch.