diff --git a/index.bs b/index.bs index 36b9a76..6682568 100644 --- a/index.bs +++ b/index.bs @@ -124,7 +124,11 @@ dictionary StorageBucketOptions { 1. Set |bucket|'s [=bucket expiration|expiration=] to |expires|. - 1. Return |bucket|. + 1. Let |storageBucket| be a new {{StorageBucket}}. + + 1. Set |storageBucket|'s [=/storage bucket=] to |bucket|. + + 1. Return |storageBucket|. @@ -175,6 +179,9 @@ To delete a bucket for a |storageKey| given a bucket |name|, run the +Issue: [[Storage]] needs to define bucket removal/clearing. The bucket needs to be internally marked as +removed and subsequent attempts to access it (through associated storage endpoints) should fail. +

Enumerating buckets

@@ -227,6 +234,8 @@ interface StorageBucket { }; +A {{StorageBucket}} has an associated [=/storage bucket=]. + A {{StorageBucket}} has a bucket quota, a number-or-null, initially null. Specifies the upper limit of usage which can be used by the bucket. The user agent MAY further limit the realized storage space. @@ -250,8 +259,23 @@ The user agent MUST ignore the [=bucket durability=] for operations that otherwi

Using Indexed Database

-A {{StorageBucket}} has an {{IDBFactory}} object. [[IndexedDB]] objects created through -{{StorageBucket/indexedDB}} are associated with the bucket. +Issue: {{IDBFactory}} methods need to take a storage bottle map rather than a storageKey. + +
+ +A {{StorageBucket}} has an {{IDBFactory}} object. The indexedDB getter steps are: + +1. Let |bucket| be [=this=]'s [=/storage bucket=]. + +1. Let |bottle map| be the result of [=obtain a local storage bottle map=] with |bucket| and `"indexedDB"`. + +1. Let |indexedDB| be an {{IDBFactory}} object. + +1. Set the [=bottle map=] for |indexedDB| to |bottle map|. + +1. Return |indexedDB|. + +
@@ -269,7 +293,21 @@ of an {{IDBTransaction}} |transaction|. To calculate the effective Using CacheStorage -A {{StorageBucket}} has a {{CacheStorage}} object. [[service-workers#cache-objects]] objects created through {{StorageBucket/caches}} are associated with the bucket. +
+ +A {{StorageBucket}} has a {{CacheStorage}} object. The caches getter steps are: + +1. Let |bucket| be [=this=]'s [=/storage bucket=]. + +1. Let |bottle map| be the result of [=obtain a local storage bottle map=] with |bucket| and `"cacheStorage"`. + +1. Let |cacheStorage| be a {{CacheStorage}} object. + +1. Set the relevant name to cache map for |cacheStorage| to |bottle map|. + +1. Return |cacheStorage|. + +

Using an Origin Private File System

@@ -279,9 +317,9 @@ Issue: [[FS]] needs to define a helper to retrieve an OPFS given a bottle map.
-The getDirectory() steps for |bucket| are: +The getDirectory() steps are: -1. Let |map| be the result of [=obtain a local storage bottle map=] with |bucket| and `"fileSystem"`. +1. Let |map| be the result of [=obtain a local storage bottle map=] with [=this=]'s [=/storage bucket=] and `"fileSystem"`. 1. Return the result of retrieving a [[FS#sandboxed-filesystem]] with |map|.