diff --git a/index.bs b/index.bs index cd6a2d6..189a2bc 100644 --- a/index.bs +++ b/index.bs @@ -1,17 +1,81 @@
-Title: Storage Buckets
+Title: Storage Buckets API
 Shortname: storage-buckets
 Level: 1
 Status: CG-DRAFT
 Group: WICG
 Repository: WICG/storage-buckets
-URL: http://example.com/url-this-spec-will-live-at
-Editor: Victor Costan, Google Inc. https://google.com, costan@google.com
-!Tests: web-platform-tests storage-buckets/ (ongoing work)
-Abstract: A short description of your spec, one or two sentences.
+URL: https://wicg.github.io/storage-buckets/
+Editor: Evan Stade, Google https://www.google.com/, estade@google.com
+Editor: Ayu Ishii, Google https://www.google.com/, ayui@google.com
+Former Editor: Victor Costan
+!Participate: GitHub WICG/storage-buckets (new issue, open issues)
+Abstract: The Storage Buckets API provides a way for sites to organize locally stored data into groupings called "storage buckets". This allows the user agent or sites to manage and delete buckets independently rather than applying the same treatment to all the data from a single origin.
 
-Introduction {#intro} -===================== +

The {{StorageBucketManager}} interface

-See https://github.com/tabatkins/bikeshed to get started. + +[SecureContext] +interface mixin NavigatorStorageBuckets { + [SameObject] readonly attribute StorageBucketManager storageBuckets; +}; +Navigator includes NavigatorStorageBuckets; +WorkerNavigator includes NavigatorStorageBuckets; + + +Each [=environment settings object=] has an associated {{StorageBucketManager}} object. + +The storageBuckets +getter steps are to return [=this=]'s {{StorageBucketManager}} object. + + +[Exposed=(Window,Worker), + SecureContext] +interface StorageBucketManager { + Promise<StorageBucket> open(DOMString name, optional StorageBucketOptions options = {}); + Promise<sequence<DOMString>> keys(); + Promise<undefined> delete(DOMString name); +}; + +enum StorageBucketDurability { + "strict", + "relaxed" +}; + +dictionary StorageBucketOptions { + boolean? persisted = null; + StorageBucketDurability? durability = null; + unsigned long long? quota = null; + DOMHighResTimestamp? expires = null; +}; + + +

Creating a bucket

+

Deleting a bucket

+

Enumerating buckets

+ +

The {{StorageBucket}} interface

+ +[Exposed=(Window,Worker), + SecureContext] +interface StorageBucket { + [Exposed=Window] Promise<boolean> persist(); + Promise<boolean> persisted(); + + Promise<StorageEstimate> estimate(); + + Promise<StorageBucketDurability> durability(); + + Promise<undefined> setExpires(DOMHighResTimeStamp expires); + Promise<DOMHighResTimeStamp?> expires(); + + [SameObject] readonly attribute IDBFactory indexedDB; + + [SameObject] readonly attribute CacheStorage caches; + + Promise<FileSystemDirectoryHandle> getDirectory(); +}; + + +

Security and privacy considerations