WICG / lock-screen

Lock screen API
Other
9 stars 1 forks source link

Why a new storage API #2

Open mkruisselbrink opened 3 years ago

mkruisselbrink commented 3 years ago

I'm not saying the choice for a new storage API is necessarily the wrong choice here. But it would be good if the explainer would address why this is the right choice. An alternative option that would still require websites to explicitly opt in to sharing certain data with their lock-screen environment could for example be to add an option to the (under development) navigator.storageBuckets.open method that would either opt particular buckets in to being shared with the lockscreen, or alternatively to give the lock screen direct access to storage from the main environment or vice versa.

One pro I can think of for that approach would be that it could avoid the need to copy data between normal storage and this special lock screen storage, and it gives you the full power of existing storage APIs rather than merely a key-value store.

loubrett commented 3 years ago

This design was based on the existing implementation for Chrome Apps, but we'll take a look at the storage buckets and other options and discuss further offline and get back to you.