Intent to Implement and Ship: IDBCursor request

68 views
Skip to first unread message

Yannic Bonenberger

unread,
May 2, 2019, 1:58:44 PM5/2/19
to blink-dev

Contact emails

yannic.bo...@gmail.com


Explainer

https://github.com/w3c/IndexedDB/issues/255#issue-416772452


Spec

https://w3c.github.io/IndexedDB/#dom-idbcursor-request


This is a minor addition exposing already spec’d behavior.


Summary

This change exposes the underlying IDBRequest of IDBCursor objects.


Requests for cursors are different as they can succeed many times. For example when you call cursor.continue(), the success of that operation is provided in the request returned by source.openCursor(). This means that passing just the cursor isn’t sufficient, thus making APIs of libraries like IDB more complex than necessary by requiring users to also pass the request.

Other parts of IndexedDB like store.transaction already provide similar functionality.

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Risks

Interoperability and Compatibility

The feature was received positively by the other major browser vendors and was added to the IndexedDB specification. It is very likely to become an interoperable part of the web platform.


Edge: Public support https://github.com/w3c/IndexedDB/issues/255#issuecomment-470255421

Firefox: Public support https://github.com/w3c/IndexedDB/issues/255#issuecomment-474507783

Safari: Public support https://github.com/w3c/IndexedDB/issues/255#issuecomment-470255862

Web developers: No signals


Activation

IndexedDB is generally wrapped in libraries, so this feature will be most impactful when adopted by the popular wrapper libraries. Libraries can use feature detection to take advantage of this feature immediately.


Is this feature fully tested by web-platform-tests?

Yes.

https://wpt.fyi/results/IndexedDB/idbcursor-request.any.worker.html?label=master&product=chrome%5Bexperimental%5D&product=edge&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&aligned&q=idbcursor-request


Tracking bug

https://crbug.com/943344


Entry on the feature dashboard

https://chromestatus.com/feature/5432744081358848


Requesting approval to ship?

Yes.


Alex Russell

unread,
May 2, 2019, 3:13:19 PM5/2/19
to blink-dev
Has TAG review been requested or is there a reason not to request in this instance?

Jake Archibald

unread,
May 2, 2019, 3:25:57 PM5/2/19
to Alex Russell, blink-dev
What's the bar for involving TAG? This is such a small & straight-forward change I wouldn't have thought to bother them about it.

On Thu, 2 May 2019, 20:13 'Alex Russell' via blink-dev, <blin...@chromium.org> wrote:
Has TAG review been requested or is there a reason not to request in this instance?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/9d4efeab-0782-487f-b5fb-381f769995ab%40chromium.org.

Daniel Bratell

unread,
May 2, 2019, 4:04:18 PM5/2/19
to Alex Russell, 'Jake Archibald' via blink-dev, Jake Archibald
I can't point at the line (Alex is working on a better line definition), but we do require there to be either a tag review or an explanation why that step could/should be bypassed.

/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPy%3DJooTmpx0rP4Cn7XPQBz0Tu6gKohnxb8qsi6%3Dya724zZQcw%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Jake Archibald

unread,
May 2, 2019, 5:49:06 PM5/2/19
to Daniel Bratell, Alex Russell, blink-dev
I'll take a stab at an explanation:

It's a small change, exposing something already in the spec by the same name that's used elsewhere in the API. The pattern is typical for the rest of the API. Four browser vendors agreed to the change.

Rick Byers

unread,
May 2, 2019, 8:58:21 PM5/2/19
to Jake Archibald, Daniel Bratell, Alex Russell, blink-dev
Yeah this seems quite simple and non-controversial to me. Almost certainly a waste of TAG's limited time.

LGTM1

Chris Harrelson

unread,
May 2, 2019, 10:56:49 PM5/2/19
to Rick Byers, Jake Archibald, Daniel Bratell, Alex Russell, blink-dev

Yoav Weiss

unread,
May 2, 2019, 11:41:24 PM5/2/19
to Chris Harrelson, Rick Byers, Jake Archibald, Daniel Bratell, Alex Russell, blink-dev

Yannic Bonenberger

unread,
May 3, 2019, 4:17:02 AM5/3/19
to blink-dev, chri...@chromium.org, rby...@chromium.org, jakear...@google.com, bra...@opera.com, sligh...@google.com
Thanks!

Regarding the TAG review: Jake’s was right about why we didn't involve them. I should have made this clear in the intent, sorry.

On Friday, May 3, 2019 at 5:41:24 AM UTC+2, Yoav Weiss wrote:
LGTM3

On Fri, May 3, 2019 at 3:56 AM Chris Harrelson <chri...@chromium.org> wrote:
LGTM2

On Thu, May 2, 2019 at 5:58 PM Rick Byers <rby...@chromium.org> wrote:
Yeah this seems quite simple and non-controversial to me. Almost certainly a waste of TAG's limited time.

LGTM1

On Thu, May 2, 2019 at 5:49 PM 'Jake Archibald' via blink-dev <blin...@chromium.org> wrote:
I'll take a stab at an explanation:

It's a small change, exposing something already in the spec by the same name that's used elsewhere in the API. The pattern is typical for the rest of the API. Four browser vendors agreed to the change.
On Thu, 2 May 2019, 21:04 Daniel Bratell, <bra...@opera.com> wrote:
I can't point at the line (Alex is working on a better line definition), but we do require there to be either a tag review or an explanation why that step could/should be bypassed.

/Daniel


On Thu, 02 May 2019 21:25:42 +0200, 'Jake Archibald' via blink-dev <blin...@chromium.org> wrote:

What's the bar for involving TAG? This is such a small & straight-forward change I wouldn't have thought to bother them about it.

On Thu, 2 May 2019, 20:13 'Alex Russell' via blink-dev, <blin...@chromium.org> wrote:
Has TAG review been requested or is there a reason not to request in this instance?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPy%3DJorAAUYGogvseTKBJdR2xAtTJv6k7XDvaLfEAyzw8z2n7A%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.

PhistucK

unread,
May 3, 2019, 9:25:06 AM5/3/19
to Yannic Bonenberger, blink-dev, Chris Harrelson, Rick Byers, Jake Archibald, Daniel Bratell, Alex Russell
In case anyone else did not realize what this was about -
This is about adding IDBCursor.prototype.request that exposes the cursor request that is returned by IDBObjectStore.prototype.openCursor() (and similar)
(The success event of that request is the way to get the IDBCursor in the first place)

PhistucK


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/941afcb2-63be-46ed-b400-4fe5b0b3cbf8%40chromium.org.
Reply all
Reply to author
Forward
0 new messages