- From: Andrei Popescu <andreip@google.com>
- Date: Tue, 24 Aug 2010 18:58:56 +0100
- To: Jeremy Orlow <jorlow@chromium.org>
- Cc: public-webapps WG <public-webapps@w3.org>
On Tue, Aug 24, 2010 at 6:30 PM, Jeremy Orlow <jorlow@chromium.org> wrote: > Last we spoke about constants in IndexedDB, (like IDBKeyRange.LEFT_BOUND) I > believe we had decided that all the objects with constants would have an > interface object hanging off of window so it's possible to simply say > "IDBKeyRange.LEFT_BOUND" within JavaScript. What happens when someone tries > something like the following JS: |IDBCursor.continue()|? Given that we're > using an interface object, I'd assume we throw some sort of exception or > something? I tried to figure out the answer in the WebIDL spec (I imagine > it's somewhere around > here http://dev.w3.org/2006/webapi/WebIDL/#dfn-interface-object) but it's a > lot to wade through. Any advice would be great. > Also, the spec still has "[NoInterfaceObject]" for a lot of the interfaces. > I believe Nikunj did this by accident and was supposed to revert, but I > guess he didn't? I should file a bug to get these removed, right? > Another question: Right now all the error constants are on > IDBDatabaseException which is an exception rather than an interface. Is > this allowed? And even if so, should we put them on IDBDatabaseError > instead, given that it's the class people will be using more often (with the > async interface)? Or maybe we should duplicate the constants in both > places? It just feels weird to me that I keep reaching into > IDBDatabaseException for these constants. I wonder if it would make sense to group all constants into a separate interface, which would have an interface object. The rest of the interfaces would all be defined with [NoInterfaceObject]. What do you think? Thanks, Andrei
Received on Tuesday, 24 August 2010 17:59:27 UTC