Git Product home page Git Product logo

indexeddbshim's Introduction

IndexedDB Polyfill Build Status

A polyfill to enable IndexedDB using WebSql.

IndexedDB is not supported on all browsers. This IndexedDB polyfill exposes the IndexedDB API in unsupported browsers using WebSQL. This shim is basically an IndexedDB-WebSql adapter.

More details about the project at gh-pages

Using this polyfill, you can use a single offline storage API across browsers (Opera, Safari, Firefox, Chrome and IE10) and even mobile devices (Phonegap on iOS and Android).

Using the polyfill

To use the polyfill, simply download the concatenated, minified product from the dist directory and include it in your HTML document.

If IndexedDB is not natively supported (and WebSQL is), the polyfill kicks in and makes a window.IndexedDB object available for you to use. If you want to force the use of this polyfill (on Chrome where both IndexedDB and WebSql are supported), simply use window.shimIndexedDB.__useShim().

Building

To build IndexedDBShim.min.js

  1. Ensure that you have node and grunt.
  2. Run npm install grunt-jsmin-sourcemap to get the latest version of sourcemap generator.
  3. Run grunt (or grunt.cmd on windows) on your command line
  4. The output files will be generated in the dist directory.

Testing

To check if the IndexedDB polyfill works, open test/index.html (hosted from a local server) and check if all the tests complete.

Debugging

The IndexedDB polyfill has sourcemaps enabled, so the polyfill can be debugged even if the minified file is included. To print out debug status, use window.shimIndexedDB.__debug(true)

Contributing

Pull requests or Bug reports welcome !!

indexeddbshim's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.