Skip to content
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

Add Spec Skeleton #43

Merged
merged 4 commits into from
Dec 21, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 74 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
@@ -1,17 +1,83 @@
<pre class='metadata'>
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, [email protected]
!Tests: <a href=https://github.com/w3c/web-platform-tests/tree/master/storage-buckets>web-platform-tests storage-buckets/</a> (<a href=https://github.com/w3c/web-platform-tests/labels/storage-buckets>ongoing work</a>)
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/, [email protected]
Editor: Ayu Ishii, Google https://www.google.com/, [email protected]
Former Editor: Victor Costan
!Participate: <a href="https://github.com/WICG/storage-buckets">GitHub WICG/storage-buckets</a> (<a href="https://github.com/WICG/storage-buckets/issues/new">new issue</a>, <a href="https://github.com/WICG/storage-buckets/issues?state=open">open issues</a>)
Abstract: The storage buckets API provides a way for a site to create multiple storage buckets, where the user agent may choose to delete each bucket independently of other buckets.
ayuishii marked this conversation as resolved.
Show resolved Hide resolved
</pre>

Introduction {#intro}
=====================
<h2 id="storage-bucket-manager">The {{StorageBucketManager}} interface</h2>

See https://github.com/tabatkins/bikeshed to get started.
<xmp class="idl">
[SecureContext]
interface mixin NavigatorStorageBuckets {
[SameObject] readonly attribute StorageBucketManager storageBuckets;
};
Navigator includes NavigatorStorageBuckets;
WorkerNavigator includes NavigatorStorageBuckets;
</xmp>

Each [=environment settings object=] has an associated {{StorageBucketManager}} object.

The <dfn attribute for=NavigatorStorageBuckets><code>storageBuckets</code></dfn>
getter steps are to return [=this=]'s {{StorageBucketManager}} object.

<xmp class="idl">
[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;
};
</xmp>

<h3 id="storage-bucket-open">Creating a bucket</h3>
<h3 id="storage-bucket-delete">Deleting a bucket</h3>
<h3 id="storage-bucket-keys">Enumerating buckets</h3>

<h2 id="storage-bucket">The {{StorageBucket}} interface</h2>
<xmp class="idl">
[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 LockManager locks;
ayuishii marked this conversation as resolved.
Show resolved Hide resolved

[SameObject] readonly attribute CacheStorage caches;

Promise<FileSystemDirectoryHandle> getDirectory();
};
</xmp>

<h2 id="security-privacy">Security and privacy considerations</h2>