Use of IndexedDB

edited October 2013 in General

this is not directly related to Enyo, but I hope for some help from the JS-Pros:

I am toying around a bit with an IndexedDB implemented as an Enyo-Component, mainly to get myself comfortable with some of the concepts of Enyo and IndexedDB. The only browser I can use IndexedDB with (as developer) seems to be Google Chrome. In Firefox, I did not find a way to view the databases.

However, Chrome seems to have a "lag" in the developer tools. When I create or modify a new object store, I have to do a refresh (Strg + R) in order to see it. The "Refresh IndexedDB" in the context menu does not help. I think, this is due to Chrome marking data as deleted, but actually not deleting it (it does that later).

However, my question are:
1) Some tutorials use "", some are using "event.currentTarget" within event-handlers. What's the difference? Additionally: When I open my DB, an Event is fired. The "currentTarget" of this is null (inspected via console.log(inEvent)), when a console.log(inEvent.currentTarget) reveals an IDBOpenDBRequest? Interestingly, in Firefox, the Event.currentTarget is an IDBOpenDBRequest from the beginning. As if Chrome has another "Lag" in the field of IndexedDB.
See Somehow doesn't work in Firefox. Click on "Open DB", there will appear a group "Callback: OpenDB success " in the Console. The first output in it is the Event; when you open it, you will see "currentTarget: null". The second line is "console.log(inEvent.currentTarget);", so currentTarget suddenly has a value?
2) Can someone tell my, how I can view the size of my database?
Sign In or Register to comment.