databases

The databases method of the IDBFactory interface returns a list represening all the available databases, including their names and versions.

Note: This feature is available in Web Workers.

Note: This method is introduced in a draft of a specifications and browser compatibility is limited.

Syntax

const promise = indexedDB.databases()

Parameters

The method does not take in any parameters.

Return value

A promise that resolves either to an error or a list of dictionaries, each with two elements, name and version.

name

The database name.

version

The database version.

Exceptions

This method may raise a DOMException of the following types:

Attribute Description
SecurityError The method is called from an opaque origin.
Other error Specification does not describe all possible errors.

Example

const promise = indexedDB.databases()
promise.then(databases => {
  console.log(databases)
})

Specifications

Specification Status Comment
Unknown
The definition of 'databases()' in that specification.
Unknown Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
databases
Experimental
Chrome Full support 71Edge No support NoFirefox No support No
Notes
No support No
Notes
Notes See bug 934640.
IE No support NoOpera Full support 58Safari No support NoWebView Android Full support 71Chrome Android Full support 71Firefox Android No support No
Notes
No support No
Notes
Notes See bug 934640.
Opera Android Full support YesSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

See also