The indexedDB
property of the WindowOrWorkerGlobalScope
mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
var DBOpenRequest = self.indexedDB.open('toDoList');
An IDBFactory
object.
var db; function openDB() { var DBOpenRequest = window.indexedDB.open('toDoList'); DBOpenRequest.onsuccess = function(e) { db = DBOpenRequest.result; } }
Specification | Status | Comment |
---|---|---|
Indexed Database API 2.0 The definition of 'indexedDB' in that specification. | Editor's Draft | Defined in a WindowOrWorkerGlobalScope partial in the newest spec. |
Indexed Database API The definition of 'indexedDB' in that specification. | Recommendation | Initial definition. |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | 23webkit 24 | (Yes) | 10 moz 16.0 (16.0) 52.0 (52.0)[1] | 10, partial | 15 | 7.1 |
Available in workers | (Yes) | (Yes) | 37.0 (37.0) | ? | (Yes) | ? |
Feature | Android | Edge | Firefox Mobile (Gecko) | Firefox OS | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | 4.4 | (Yes) | 22.0 (22.0) 52.0 (52.0)[1] | 1.0.1 | 10 | 22 | 8 |
Available in workers | (Yes) | (Yes) | 37.0 (37.0) | (Yes) | ? | (Yes) | ? |
[1] indexedDB
now defined on WindowOrWorkerGlobalScope
mixin.
IDBDatabase
IDBTransaction
IDBKeyRange
IDBObjectStore
IDBCursor
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/indexedDB