Instead of shimming, directly wrapping IndexedDB API and fail back to WebSQL have better performance and more robust https://bitbucket.org/ytkyaw/ydn-db
Thanks! This is great shim... very powerful to have the same source code for mobile (iOS and Android).