Thursday, January 6, 2011

IndexedDB for Internet Explorer


Run IE in administrator mode. Select "Run ActiveX for all websites" in the security bar if prompted.

I had previously posted about TrialTool and how it was used to showcase the IndexedDB APIs in Firefox. You can find the application here. A few weeks ago, Microsoft also released their prototype of IndexedDB, and I wanted to see if I could get some examples working for IE.
To run the examples, you need to register the ActiveX plugin, as indicated in the README file. To run the examples here, you would also need to run IE in the administrator mode. IE will pop up the security ribbon at the to, asking if you would like to allow the ActiveX to run. Select the option to run the control for all websites as IE, for some reason, resets the fragment identifier. Since this example is identified by its fragment identifier, you need to select that the ActiveX runs for all websites.
You can find the code for the examples here. The pre-requisites code is picked from the bootlib.js file in the download package. It basically initializes the ActiveX control and assigns a set of constants. 
The harder part was to play around with transactions, opening a new READ-WRITE transaction for every operation. Only one active transaction is possible at a time. The other examples are simple, following the API to the book. 
I have not had a chance to update the documentation yet, but that is something I will work on, as I get time. There was also a change to the TrialTool, marked by the commit here.
Watch out this tag for more updates.

No comments:

Post a Comment