Re: [storage] Allow script to request permission only if there would be no prompt (#9)

> To me it makes no sense if a generic API such as permissions.get() or some such would end up changing the box, which requires detailed domain knowledge. That would seem like a bad layering violation.

I think the model here is very different from the one I have in mind. My model is as follows:

- The UA has a permission, which is roughly "can write to persistent storage" or "cannot write to persistent storage."
- Every time you do a write, the UA asks "what permission do I have?" if it's "can write to persistent storage," then it goes in the persistent box.

As such, granting permission does not actually have any domain-related side effects. It just changes a boolean which is later consulted by the domain-specific code.

I guess that is not how the spec is written right now. So then my question is: why? Is the spec-as-it-is-now model more aligned with browsers in some way?

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/issues/9#issuecomment-132644550

Received on Wednesday, 19 August 2015 15:47:34 UTC