W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: [Bug 10430] New: [IndexedDB] We need to make it more clear IDBRequests can be reused and spec readyState's behavior

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 1 Nov 2010 02:57:27 -0700
Message-ID: <AANLkTikagbJ8pJcwj1a33bo-gTeXtQEj9UydiSeE15kY@mail.gmail.com>
To: Jeremy Orlow <jorlow@chromium.org>
Cc: bugzilla@jessica.w3.org, public-webapps@w3.org
On Mon, Nov 1, 2010 at 2:49 AM, Jeremy Orlow <jorlow@chromium.org> wrote:
> On Mon, Nov 1, 2010 at 9:42 AM, Jonas Sicking <jonas@sicking.cc> wrote:
>> On Mon, Nov 1, 2010 at 1:46 AM, Jeremy Orlow <jorlow@chromium.org> wrote:
>> > Actually, what's the use case for readyState?  I can't think of any uses
>> > that we'd want to encourage.  Maybe we should just remove it.
>> The use-case that I've heard in similar situations goes something like
>> this:
>> Code makes a request and at some point later hands the request to some
>> other piece of code which is interested in the result.
>> The other piece of code doesn't necessarily know if a result has been
>> returned yet or not. Using readyState it can either simply get
>> .result, or it can add a event listener for the "success" event and
>> wait for the event to fire.
>> I think that makes sense here too.
> What about the cursor case though?  Given that we're re-using the same
> request object, I really don't think it makes much sense.

It makes sense if the code the request is passed to is the one calling
continue(), no?

/ Jonas
Received on Monday, 1 November 2010 09:58:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:13 UTC