[whatwg/storage] Expose persist() to workers (#29)

The use case is using a ServiceWorker to fetch and store objects (e.g. as a reaction on a web push) to have them ready when the user visits the site. Having the objects persisted would be an advantage.
I understand the issue of a ServiceWorker prompting the user for permission, but can't that be sorted by having the web page asking for persisted permission to persist, and that is also valid for the SW script (having the same origin)?
The SW script could then check using the permission API if it has permission to persist(), and skip calling persist() if not.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/issues/29

Received on Friday, 27 May 2016 16:25:17 UTC