Re: [w3ctag/spec-reviews] Budget API (especially reserve() method) (#169)

A few thoughts as others haven't had a chance to weigh in on this; will open issues (as requested) once others here look:

 - As always, please link your explainer or use-cases doc from your spec.
 - This API doesn't seem to have an explicit explainer; the [`README`](https://github.com/WICG/budget-api/blob/gh-pages/README.md) is all I could find.
 - There isn't any sort of "observer" or event to let an app know about budget changes (e.g., when you run out of budget for something). Is that planned?
 - The spec is defining another registry-alike. This is problematic. It seems as though this should either be part of the [Permissions API](https://w3c.github.io/permissions/) or the registry of names unified with it. 
 - The `README` doesn't discuss considered and rejected alternative designs (e.g., direct integration into the Permissions API)
 - The second example in the README shows how to understand if an operation can be afforded...why not provide a convenience method for this along with the existing (lower-level) functionality?
 - It's surprising that `reserve()` doesn't also report the amount of remaining budget on success
 - Why are individual methods scoped to secure origins and not the entire API?
 - Aside from `precise-timer` (speculative) and `silent-push`, what other APIs are anticipated to integrate with this API? Should the TAG be looking to encourage existing APIs to add budgets? Which ones?
 - Budget (via `getBudget()`) appears to be global and not a per-operation-type budget. Have you consulted with other browsers to ensure that this is a reasonable design choice for their implementations?
 - What error will be provided for unsupported operations?

/cc @beverloo @owencm 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/spec-reviews/issues/169#issuecomment-294897573

Received on Tuesday, 18 April 2017 16:19:33 UTC