W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [Bug 10402] New: [IndexedDB] IDBCursor.remove/update behavior when at end of range unspecified

From: Jeremy Orlow <jorlow@chromium.org>
Date: Thu, 19 Aug 2010 20:57:38 +0100
Message-ID: <AANLkTimxB0mpw+ppSyJoT6tR-cmPvTYLxBBfn7rzPey8@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: bugzilla@jessica.w3.org, public-webapps@w3.org
On Thu, Aug 19, 2010 at 8:11 PM, Jonas Sicking <jonas@sicking.cc> wrote:

> We also need to define behavior when any method is called outside of a
> cursor callback. I.e.
>
> db.transaction(['foo']).objectStore('foo').openCursor(...).onsuccess =
> function(e) {
>  var cursor = e.result;
>  if (cursor) {
>    setTimeout(function() {
>      cursor.value;
>      cursor.remove();
>      cursor.update(...);
>      cursor.continue();
>    }, 10);
>    ... do other stuff to keep the transaction alive ...
>  }
> }
>

Why would this be a problem?  Do we limit such things in any other part of
the API?

J
Received on Thursday, 19 August 2010 19:58:33 GMT

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