HTML DOM indexedDB databases() Method
The databases() method of the indexedDB interface returns a list representing all the available databases in the document, with their names and versions.
dbs = indexedDB.databases();
Parameters: The method does not take any parameters.
Return value: This method returns a promise containing a list of dictionaries, each with two elements, name and version.
Example: In this example, we will open a database and hence, will get the databases using this method.
Before Button Click:
After Button Click: In the console, the promise can be seen.
- Google Chrome
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.