- From: Axel Rauschmayer <axel@rauschma.de>
- Date: Fri, 28 Jan 2011 10:15:52 +0100
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Jeremy Orlow <jorlow@chromium.org>, public-webapps@w3.org
> Also note that the reason that your suggestion removes the need for > readyState is that your proposal decides to drop support for the > use-case that readyState aims to help solve. I.e. the ability to > register additional event handlers sometime after the request is > created. All API invocations that I have seen relied on run-to-completion semantics and add a listener after the initial invocation. These now have to check the flag? Note that one can create the event emitter (and register handlers) before invoking an operation. > >> Then IDBRequest would be more like an event, right? It would be sent to the onsuccess and onerror event handlers. > > I don't understand what you mean here. But in the current model (both > the one that's in the spec right now, and the one that I'm proposing) > we're using real DOM-Events. Can't really get more "like events" than > that? Right, I’m sorry. I was confused, because IDBRequest plays double duty. To me an event is something that is created at the event emitter and directly sent to event handlers, without exposing it inbetween. That is too narror and IDBRequest is indeed an event. -- Dr. Axel Rauschmayer axel@rauschma.de Home: http://rauschma.de Blog: http://2ality.com
Received on Friday, 28 January 2011 09:16:21 UTC