Skip to main content
100%

Very Simple IndexedDB Example

✓ Published0🌍 Public
Aamundo
Last edited Apr 30, 2015
Created on Jun 5, 2018

This example demonstrates basic IndexedDB operations, including database creation, object store setup, index management, and data retrieval. It shows how to open a database named “MyDatabase” and create an object store with a keyPath of “id” and a compound index on name fields. The code adds two records with nested name objects and then queries them both by primary key and by index lookup, logging results to the console. It uses the native IndexedDB API with cross-browser fallbacks, including the IndexedDBShim for unsupported environments.

AI-generated description

Similar vizzes