Reputation: 3271
I'm writing a cross/browser javascript "database explorer" that will allow me to look into local storage mechanisms. This should be a pretty handy tool for development. (Yes I'm aware that each browser has their own developer tools, but I want to create one that works across all browsers)
The question then is: how do I get a list of the databases that have been created in IndexedDB? And once I get that list, how can I open them without causing a change in version?
Upvotes: 2
Views: 2073
Reputation: 4180
The answer is unfortunately simple: it isn't possible. And for privacy reasons it is a good thing that it isn't possible. The best way to make your database explorer is letting the developers pass the database name. I have written an indexeddbviewer my self, and I let the developer pass the db name in a data attribute. A blogpost shows you how you can use it, and the viewer is available on codeplex. And as last, I also have a demo of it.
Upvotes: 1