UNPKG

indexeddbshim

Version:
122 lines (120 loc) 7.08 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>IndexedDB Polyfill</title> <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" /> <link href="style.css" rel="stylesheet" /> </head> <body> <div id="content-wrap"> <h1>IndexedDB Polyfill over WebSQL</h1> <div id="content"> <div id="download"> <a href="https://raw.githubusercontent.com/indexeddbshim/indexeddbshim/master/dist/indexeddbshim.min.js" target="_blank" class="punch">Download indexeddb.shim.js</a> </div> <div> <p>A polyfill to enable IndexedDB using WebSQL.</p> <p>IndexedDB is not supported on <a href="http://caniuse.com/#search=IndexedDB" target="_blank">all browsers</a>. This IndexedDB polyfill exposes the IndexedDB API in unsupported browsers using WebSQL. This shim is basically an IndexedDB-WebSQL adapter.</p> <p>Check out my <a href="http://blog.nparashuram.com/search/label/indexeddb">blog</a> for updates.</p> </div> <div> <h2>Download</h2> <div> <a href="https://raw.githubusercontent.com/indexeddbshim/indexeddbshim/master/dist/indexeddbshim.min.js" target="_blank">Download the polyfill</a> </div> <p style ="margin-top: 10px;"> To keep the code manageable, the modules are in <a href="https://github.com/indexeddbshim/indexeddbshim/tree/master/src">different files</a>. The link above is simply a concatenation of all these files. </p> </div> <div> <h2>Test Cases</h2> <p> Run the test cases (<a href="tests-mocha/index.html?useShim=true">Mocha</a>, <a href="tests-polyfill/fakeIndexedDB/index.html?useShim=true">Fake</a>, <a href="tests-polyfill/indexedDBmock/index.html?useShim=true">Mock</a>, and <a href="tests-polyfill/w3c/index.html?useShim=true">W3C (older)</a>.) to see how the polyfill performs on your non-IndexedDB supported browser like Opera or Safari. It also works on Chrome as Chrome also has WebSQL. This would run on devices like the iPad and the iPhone too !! </p> <p>One may also run up-to-date W3C tests against our polyfill, but at present one must set up a local environment for this. See the <a href="https://github.com/indexeddbshim/indexeddbshim">README</a> for details.</p> </div> <div> <h2>Libraries tested to work with the shim</h2> <p> The polyfill implements the IndexedDB API specification. The following libraries have examples that work with the polyfill. Note that the jQuery and LINQ examples may now be outdated. </p> <ul> <li> <a href="http://nparashuram.com/jquery-indexeddb">JQuery-IndexedDB</a> plugin - <a href="http://nparashuram.com/jquery-indexeddb/example/">See example</a> </li> <li> LINQ API for IndexedDB <a href="http://linq2indexeddb.codeplex.com/">LINQ2IndexedDB</a> </li> <li> <a href="http://aaronpowell.github.com/db.js/">DB.JS</a> library - <a href="examples/dbjs.html">See Examples</a> </li> </ul> </div> <div> <h2>Source Code</h2> <p> Fork the repository on <a href="https://github.com/indexeddbshim/indexeddbshim">GitHub</a>. The source code allows you to use either Apache 2.0 or MIT. </p> <p> The implementation is not 100% to the spec and some work still needs to be done. There are a couple of <a href="https://github.com/indexeddbshim/indexeddbshim/issues">open issues</a> to be fixed. </p> <p> Send out a pull request if you would like to help !! </p> </div> <div> <h2>Other IndexedDB links</h2> <ul> <li> <a href="http://nparashuram.com/IndexedDB" target="_blank">My other IndexedDB work</a> </li> <li> <a href="http://www.w3.org/TR/IndexedDB/" target="_blank">IndexedDB Specification</a> </li> <li> <a href="http://blog.nparashuram.com/search/label/indexeddb" target="_blank">My blog posts on IndexedDB</a> </li> </ul> </div> <div> <h2>Credits</h2> <p> A big thanks to the <a href="https://github.com/indexeddbshim/indexeddbshim/graphs/contributors">contributors</a> of this project. </p> </div> </div> </div> <a href="https://github.com/you"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a> <script> var _gaq; // eslint-disable-line no-var if (!window.location.href.includes('noanalytics=true')) { // Slowing testing down in China where Google is blocked so giving an out _gaq = _gaq || []; _gaq.push( ['_setAccount', 'UA-617499-9'], ['_setDomainName', 'none'], ['_setAllowLinker', true] ); (function () { const ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = (document.location.protocol === 'https:' ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; const s = document.querySelector('script'); s.parentNode.insertBefore(ga, s); }()); } </script> </body> </html>