W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: [IndexedDB] IDBRequest Interface Questions

From: Shawn Wilsher <sdwilsh@mozilla.com>
Date: Mon, 22 Mar 2010 09:56:50 -0700
Message-ID: <4BA7A152.7070201@mozilla.com>
To: public-webapps WG <public-webapps@w3.org>
On 3/16/2010 2:27 PM, Shawn Wilsher wrote:
> Hey all,
>
> I'm starting to work on a prototype of the IndexedDB spec to get a
> better understanding of it. While working with the IDBRequest I think I
> understand why nobody likes the current event-based model. I'm also
> seeing that as it is currently specified, it doesn't meet the
> requirements of the web developers we had talked to were looking for in
> an event based API (per the latest editors draft on March 16).
> Essentially, what they wanted was a way to add more than one listener
> for success or error, and it doesn't look like that is currently
> possible unless you roll your own callback that manages this (which they
> wanted to avoid doing). As they described it, they wanted to be able to
> use something like addEventListener with the option of also just setting
> onsuccess and onerror (much like how XHR works).
More specifically, I'm suggesting that IDBRequest inherit from 
EventTarget [1].

Cheers,

Shawn

[1] http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget



Received on Monday, 22 March 2010 16:56:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:37 GMT