Web/API/IDBFactory/databases

From Get docs

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
Indexed Database API DraftThe definition of 'databases()' in that specification. Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet

databases

Experimental'

Chrome

Full support 71

Edge

Full support 79

Firefox No support No

Notes'

No support No

Notes'

Notes' See bug 934640.

IE

No support No

Opera

Full support 58

Safari

Full support 14

WebView Android

Full support 71

Chrome Android

Full support 71

Firefox Android No support No

Notes'

No support No

Notes'

Notes' See bug 934640.

Opera Android

Full support Yes

Safari iOS

Full support 14

Samsung Internet Android

Full support 10.0

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