JavaScript Testing for IndexedDB availability


Example

You can test for IndexedDB support in the current environment by checking for the presence of the window.indexedDB property:

if (window.indexedDB) {
    // IndexedDB is available
}