Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cursor.request #255

Closed
jakearchibald opened this issue Mar 4, 2019 · 15 comments
Closed

cursor.request #255

jakearchibald opened this issue Mar 4, 2019 · 15 comments

Comments

@jakearchibald
Copy link
Contributor

Requests for cursors are different as they can succeed many times. When you call cursor.continue() the success of that operation is provided in the request returned by source.openCursor().

If I want to give an object store to another piece of code, I can just pass the object store. However, if I want to pass the cursor elsewhere, I also have to pass the related request.

Should cursor.request return https://w3c.github.io/IndexedDB/#cursor-request?

@inexorabletash
Copy link
Member

I've run into wanting this for prollyfills. SGTM.

Should be easy to spec/test/ship.

@jakearchibald
Copy link
Contributor Author

Yeah, I ran into this trying to make wrap() and unwrap() functions that 'upgrade' IDB objects. Works for everything except cursors.

@jakearchibald
Copy link
Contributor Author

I'll take this on.

I've been wanting to document how standards are developed for a while, so @surma and I will film ourselves updating the spec and writing tests.

@inexorabletash
Copy link
Member

@asutherland @aliams @beidson - any feedback on this?

@aliams
Copy link

aliams commented Mar 6, 2019

No objections here. It sounds like we're just exposing a property that is already initialized as part of the cursor and should live as long as the cursor.

@asutherland
Copy link
Collaborator

Did my thumbs-up not say it all? ;) This sounds good from a Gecko/Firefox perspective. We have the request available and Jake's magical upgrade use-case sounds both reasonable and essential to help move IDB forward from an API that only an implementer could love to the favorite API of developers everywhere!

@beidson
Copy link

beidson commented Mar 6, 2019

yah this is fine.

@inexorabletash
Copy link
Member

Thumbs everywhere! Thanks all!

Thanks @jakearchibald and @surma - looking forward to the PRs. Blink change should be trivial once WPTs are in.

@jakearchibald jakearchibald mentioned this issue Mar 13, 2019
2 tasks
inexorabletash pushed a commit that referenced this issue Mar 14, 2019
Define new |request| attribute on IDBCursor. Discussed in #255

WPT PR ready to land: web-platform-tests/wpt#15820

Implementations pending, but this should be fairly straightforward so going ahead with landing this (and tests) optimistically.
@inexorabletash
Copy link
Member

Filed https://bugs.chromium.org/p/chromium/issues/detail?id=943344 to track Blink impl

@asutherland
Copy link
Collaborator

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1536540 to track Gecko/Firefox impl.

@Soviut
Copy link

Soviut commented Apr 16, 2019

For posterity, here's the episode @jakearchibald and @surma did about this very issue https://www.youtube.com/watch?v=y1TEPQz02iU

@inexorabletash
Copy link
Member

FYI, @Yannic's change just landed in the Chromium repo so this should be available for testing in the next Chrome Canary build.

@julienw
Copy link

julienw commented Apr 27, 2020

Just landed in Firefox!

@inexorabletash
Copy link
Member

Hey @julienw - if you know the prospective Firefox release number I can add it to the "under construction" box https://w3c.github.io/IndexedDB/#dom-idbcursor-request

@asutherland
Copy link
Collaborator

https://bugzilla.mozilla.org/show_bug.cgi?id=1536540 is fixed in Firefox 77, targeted to reach release ~ June 2nd

inexorabletash pushed a commit that referenced this issue Feb 1, 2021
Define new |request| attribute on IDBCursor. Discussed in #255

WPT PR ready to land: web-platform-tests/wpt#15820

Implementations pending, but this should be fairly straightforward so going ahead with landing this (and tests) optimistically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants