-
Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathshared-storage.idl
151 lines (117 loc) · 5.17 KB
/
shared-storage.idl
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// (https://github.com/w3c/webref)
// Source: Shared Storage API (https://wicg.github.io/shared-storage/)
typedef (USVString or FencedFrameConfig) SharedStorageResponse;
[Exposed=(Window)]
interface SharedStorageWorklet : Worklet {
Promise<SharedStorageResponse> selectURL(DOMString name,
sequence<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
Promise<any> run(DOMString name,
optional SharedStorageRunOperationMethodOptions options = {});
};
callback RunFunctionForSharedStorageSelectURLOperation = Promise<unsigned long>(sequence<USVString> urls, optional any data);
[Exposed=SharedStorageWorklet, Global=SharedStorageWorklet]
interface SharedStorageWorkletGlobalScope : WorkletGlobalScope {
undefined register(DOMString name,
Function operationCtor);
readonly attribute SharedStorage sharedStorage;
readonly attribute PrivateAggregation privateAggregation;
Promise<sequence<StorageInterestGroup>> interestGroups();
readonly attribute SharedStorageWorkletNavigator navigator;
};
dictionary SharedStorageUrlWithMetadata {
required USVString url;
object reportingMetadata;
};
partial interface Window {
[SecureContext] readonly attribute SharedStorage? sharedStorage;
};
[Exposed=(Window,SharedStorageWorklet)]
interface SharedStorageModifierMethod {};
[Exposed=(Window, SharedStorageWorklet)]
interface SharedStorageSetMethod : SharedStorageModifierMethod {
constructor(DOMString key, DOMString value, optional SharedStorageSetMethodOptions options = {});
};
[Exposed=(Window, SharedStorageWorklet)]
interface SharedStorageAppendMethod : SharedStorageModifierMethod {
constructor(DOMString key, DOMString value, optional SharedStorageModifierMethodOptions options = {});
};
[Exposed=(Window, SharedStorageWorklet)]
interface SharedStorageDeleteMethod : SharedStorageModifierMethod {
constructor(DOMString key, optional SharedStorageModifierMethodOptions options = {});
};
[Exposed=(Window, SharedStorageWorklet)]
interface SharedStorageClearMethod : SharedStorageModifierMethod {
constructor(optional SharedStorageModifierMethodOptions options = {});
};
dictionary SharedStorageModifierMethodOptions {
DOMString withLock;
};
dictionary SharedStorageSetMethodOptions : SharedStorageModifierMethodOptions {
boolean ignoreIfPresent;
};
[Exposed=(Window,SharedStorageWorklet)]
interface SharedStorage {
Promise<DOMString> get(DOMString key);
Promise<any> set(DOMString key,
DOMString value,
optional SharedStorageSetMethodOptions options = {});
Promise<any> append(DOMString key,
DOMString value,
optional SharedStorageModifierMethodOptions options = {});
Promise<any> delete(DOMString key, optional SharedStorageModifierMethodOptions options = {});
Promise<any> clear(optional SharedStorageModifierMethodOptions options = {});
Promise<any> batchUpdate(sequence<SharedStorageModifierMethod> methods,
optional SharedStorageModifierMethodOptions options = {});
[Exposed=Window]
Promise<SharedStorageResponse> selectURL(DOMString name,
sequence<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
[Exposed=Window]
Promise<any> run(DOMString name,
optional SharedStorageRunOperationMethodOptions options = {});
[Exposed=Window]
Promise<SharedStorageWorklet> createWorklet(USVString moduleURL, optional SharedStorageWorkletOptions options = {});
[Exposed=Window]
readonly attribute SharedStorageWorklet worklet;
[Exposed=SharedStorageWorklet]
Promise<unsigned long> length();
[Exposed=SharedStorageWorklet]
Promise<double> remainingBudget();
[Exposed=SharedStorageWorklet]
async iterable<DOMString, DOMString>;
};
dictionary SharedStoragePrivateAggregationConfig {
USVString aggregationCoordinatorOrigin;
USVString contextId;
[EnforceRange] unsigned long long filteringIdMaxBytes;
[EnforceRange] unsigned long long maxContributions;
};
dictionary SharedStorageRunOperationMethodOptions {
object data;
boolean resolveToConfig = false;
boolean keepAlive = false;
SharedStoragePrivateAggregationConfig privateAggregationConfig;
DOMString savedQuery;
};
dictionary SharedStorageWorkletOptions : WorkletOptions {
USVString dataOrigin = "context-origin";
};
interface mixin HTMLSharedStorageWritableElementUtils {
[CEReactions, SecureContext] attribute boolean sharedStorageWritable;
};
HTMLIFrameElement includes HTMLSharedStorageWritableElementUtils;
HTMLImageElement includes HTMLSharedStorageWritableElementUtils;
partial dictionary RequestInit {
boolean sharedStorageWritable;
};
[
Exposed=SharedStorageWorklet
] interface SharedStorageWorkletNavigator {};
SharedStorageWorkletNavigator includes NavigatorLocks;
[SecureContext, Exposed=(Window,Worker,SharedStorageWorklet)]
interface LockManager {};
[SecureContext, Exposed=(Window,Worker,SharedStorageWorklet)]
interface Lock {};