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

Resolve add and addAll with undefined instead of responses #406

Closed
tobie opened this issue Aug 11, 2014 · 6 comments
Closed

Resolve add and addAll with undefined instead of responses #406

tobie opened this issue Aug 11, 2014 · 6 comments
Labels
Milestone

Comments

@tobie
Copy link
Member

tobie commented Aug 11, 2014

Given that add and addAll now only resolve when the full body has been streamed to the cache, resolving with the streamed response risks pushing developers to use an anti-pattern whereby the response is first streamed to the cache before being streamed to the client instead of doing both in parallel.

Proposed resolution: have both add and addAll resolve with undefined.

@tobie tobie added this to the Version 1 milestone Aug 11, 2014
@tobie
Copy link
Member Author

tobie commented Aug 11, 2014

Think the same holds true of put and delete, actually. Is there any reasons for either put or delete to resolve with a response?

@jakearchibald
Copy link
Contributor

Agreed, and I believe this is how the polyfill (and ts) behaves.

delete should return true/false depending on if anything was deleted.

@KenjiBaheux
Copy link
Collaborator

Filed crbug.com/425469 for tracking in Blink

@inexorabletash
Copy link
Member

The algorithms in the spec were updated, but the Web IDL was not

@inexorabletash
Copy link
Member

Per @annevk the IDL for this would be Promise<void>

@jungkees
Copy link
Collaborator

Addressed: ba17a4e. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants