The indexedDB
read-only property of the WindowOrWorkerGlobalScope
mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
var IDBFactory = self.indexedDB;
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. | Recommendation | Defined in a WindowOrWorkerGlobalScope partial in the newest spec. |
Indexed Database API The definition of 'indexedDB' in that specification. | Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 24
|
Yes | 16
|
10 | 15 | 7 |
Available in workers | Yes | Yes | 37 | ? | Yes | ? |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | ? | Yes | 22
|
22 | 8 | ? |
Available in workers | Yes | ? | Yes | 37 | Yes | ? | ? |
IDBDatabase
IDBTransaction
IDBKeyRange
IDBObjectStore
IDBCursor
© 2005–2018 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