I am using Firefox 21 built for Linux Mint. When I try to open the IndexedDB database from a script tag, I get an InvalidStateError. However, I am not getting an error message when I try to open the database from the JavaScript console.
The following code gives an error
<html> <body> <script src="http://code.jquery.com/jquery-1.10.0.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ indexedDB.open("MyNewDatabase"); }); </script> </body> </html>
upon entry indexedDB.open("MyNewDatabase"); the IDBOpenDBRequest object is correctly returned in the console. Any ideas what might cause this weird behavior?
I know Invalid status error in Firefox for indexed Db and InvalidStateError when opening IndexedDB in Firefox , but both questions / answers did not help me figure out the problem.
source share