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
}