I am integrating a javascript library that uses IndexedDB, but it "immodestly" does not work when Firefox is in private view / window mode. The library returns 500 Internal Error, and Firefox throws an InvalidStateError to the console.
What I would like to do is add a check before I create this library, and will not use the library at all if IndexedDB is not available. those. some type of try / catch test. From what I saw, Firefox seems to have spit out a console error, even if the violation code is inside try / catch (but maybe there is still a way ...).
Actually, I have no interest in whether the user is in a closed window session or not, but this is the only time Firefox raises this InvalidStateError.
source
share