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
Make requestPersistent() return a boolean #7
Comments
(By the way, I'm raising this as an issue so you folks can object. But please also tell me if you agree so I can actually fix this.) |
Actually, I suspect we need to keep |
My thinking was that we should keep persistentPermission() so that sites can know to prompt when they would be autogranted the permission without bothering the user. We are planning on using an "engagement score" for such a purpose: when a user uses a site enough and that site requests to be exempt from disk cleanup (aka the persistent permission), the exemption will be granted without prompting the user. But the site must request the exemption to get it.
This would be a convenience method that would return the equivalent of something like persistentPermission(defaultBox) == "granted"?
You mean adding a function to the API that takes a box id/reference as a parameter and returns synchronously? I would think not, for the classic problem where that info is on disk and we don't want to block the main thread on disk access. |
I should also clarify that we are neither committed yet nor opposed yet to implementing the generic boxes concept you outlined on the old wiki page. But we've been thinking of our storage in terms of just having the default box and that seems to work ok, at least for the time being. |
I think there's three things we care about:
Having thought about it some more, my proposal is to change the return value of This means:
I think this API satisfies all the criteria and is not awful. |
Are you opposed to adding a fourth permission that's something like |
I don't understand how |
Sorry for confusing this issue with Your proposal in #7 (comment) looks fine to me/us. Just curious, what was your original motivation for making |
The idea behind it is that |
Let's just make this a method that returns a promise for a boolean, that tells you whether the default box is persistent or not.
@inexorabletash @davidsgrogan I'm guessing we never want to give synchronous access to boxes, correct?
The text was updated successfully, but these errors were encountered: