You can test for IndexedDB support in the current environment by checking for the presence of the window.indexedDB property:
window.indexedDB
if (window.indexedDB) { // IndexedDB is available }