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
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:05 UTC