We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


Important: As of Firefox 52, the property defined in this mixin has been moved to the WindowOrWorkerGlobalScope mixin, and other browsers will follow suit. Look to that page for up-to-date details.

The IDBEnvironment helper of the IndexedDB API contains the indexedDB property, which provides access to IndexedDB functionality. It is the top level IndexedDB interface implemented by the window and Worker objects.

Note: This feature is available in Web Workers.


IDBEnvironment.indexedDB Read only
Provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an IDBFactory object.


The following code creates a request for a database to be opened asychronously, after which the database is opened when the request's onsuccess handler is fired:

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


Specification Status Comment
Indexed Database API
The definition of 'IDBEnvironment' in that specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support


23 — 57 webkit



10 — 16 moz

Available in workers Yes Yes37 ? Yes ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support2424 ?22228 ?
Available in workers Yes Yes Yes37 Yes ? ?

1. partial

See also

Document Tags and Contributors

 Last updated by: fscholz,