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 ="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 support2425 ?22228 Yes
Available in workers Yes Yes Yes37 Yes ? Yes

1. partial

See also