forked from WICG/shared-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.bs
62 lines (47 loc) · 1.94 KB
/
spec.bs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<pre class='metadata'>
Title: Shared Storage API
Shortname: sharedStorage
Level: 1
Status: CG-DRAFT
Group: WICG
URL: https://github.com/WICG/shared-storage
Editor: Camillia Smith Barnes, Google https://google.com, [email protected]
Abstract: Shared Storage is a storage API that is intentionally not partitioned by top-frame site (though still partitioned by context origin of course!). To limit cross-site reidentification of users, data in Shared Storage may only be read in a restricted environment that has carefully constructed output gates.
</pre>
Introduction {#intro}
=====================
<em>This section is not normative.</em>
This document introduces a new primitive.
<span class=XXX>TODO: Finish adding interfaces.</span>
<span class=XXX>TODO: Add algorithms for APIs.</span>
<span class=XXX>TODO: Add text, including fleshing out intro.</span>
Shared Storage DOM Interface {#dom-interface}
=============================================
<xmp class='idl'>
[Exposed=(Window)]
interface SharedStorage {
Promise<any> set(DOMString key, DOMString value, optional SharedStorageSetMethodOptions options = {});
Promise<any> append(DOMString key, DOMString value);
Promise<any> delete(DOMString key);
Promise<any> clear();
Promise<USVString> selectURL(DOMString name,
FrozenArray<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
Promise<any> run(DOMString name, optional SharedStorageRunOperationMethodOptions options = {});
readonly attribute SharedStorageWorklet worklet;
};
[Exposed=(Window)]
interface SharedStorageWorklet {
Promise<undefined> addModule(USVString moduleURL);
};
dictionary SharedStorageSetMethodOptions {
boolean ignoreIfPresent;
};
dictionary SharedStorageRunOperationMethodOptions {
object data;
};
dictionary SharedStorageUrlWithMetadata {
required USVString url;
object reportingMetadata;
};
</xmp>