Reputation: 7486
I have to check the IndexedDB availability for the Firefox browser only. Currently I do the trick with this :
var IDB_SUPPORTED = 'indexedDB' in window;
Simple. But if I disable IndexedDB in about:config
(with the dom.indexedDB.enabled
parameter), IDB_SUPPORTED
is still true
.
How can I check the real availability of IndexedDB in Firefox without any third-party library like Modernizr?
Upvotes: 2
Views: 501
Reputation:
This did it for me:
try { window.indexedDB } catch (err) { IDB_SUPPORTED = false; }
Upvotes: 2