IDBEnvironment.indexedDB

The indexedDB property of the IDBEnvironment interface provides a mechanism for applications to asynchronously access the capabilities of indexed databases.

Note: This feature is available in Web Workers.

SyntaxEdit

var DBOpenRequest = self.indexedDB.open("toDoList");

Value

An IDBFactory object.

ExampleEdit

var db;
function openDB() {
 var DBOpenRequest = window.indexedDB.open("toDoList");
 DBOpenRequest.onsuccess = function(e) {
   db = DBOpenRequest.result;
 }
} 

SpecificationsEdit

Specification Status Comment
Indexed Database API
The definition of 'indexedDB' in that specification.
Candidate Recommendation  

Browser compatibilityEdit

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 23webkit
24
10 moz
16.0 (16.0)
10, partial 15 7.1
Available in workers (Yes) 37.0 (37.0) ? (Yes) ?

See alsoEdit

Document Tags and Contributors

 Contributors to this page: chrisdavidmills, teoli, fscholz
 Last updated by: chrisdavidmills,