indexeddbshim / IndexedDBShim

A polyfill for IndexedDB using WebSql
Other
968 stars 191 forks source link

Corrected references to global IDBTransaction to use the one within idbModules instead #243

Closed rotemdan closed 8 years ago

rotemdan commented 8 years ago

I've made a fork that only installs the window.idbModules global to allow the shim to be bundled and referenced from a library in a relatively non-intrusive way (to achieve that I simply commented out the whole globalVars.js file).

It turned out that in order for that to work I needed to modify some (possibly unintentional) references to the global scope within the shim itself. I thought this particular change might be useful in general to the main branch as well.

It is possible there may be other global references, but my tests have not caught any more, so far.

brettz9 commented 8 years ago

Please see master for the latest code which uses ES6 imports in place of idbModules. master also removes support for the IDBTransaction constants (replaced by simply the strings readonly, readwrite and versionchange) as they are being removed. I think you should find the new approach (which also eliminates other globals) to be less intrusive. Feel free to file a new PR/issue if you see a need for anything else.