summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/interfaces/shared-storage.idl
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/interfaces/shared-storage.idl')
-rw-r--r--testing/web-platform/tests/interfaces/shared-storage.idl51
1 files changed, 21 insertions, 30 deletions
diff --git a/testing/web-platform/tests/interfaces/shared-storage.idl b/testing/web-platform/tests/interfaces/shared-storage.idl
index edbe2c2bcc..c40344e74d 100644
--- a/testing/web-platform/tests/interfaces/shared-storage.idl
+++ b/testing/web-platform/tests/interfaces/shared-storage.idl
@@ -3,40 +3,30 @@
// (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,
+ FrozenArray<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,
- SharedStorageOperationConstructor operationCtor);
+ Function operationCtor);
readonly attribute WorkletSharedStorage sharedStorage;
};
-callback SharedStorageOperationConstructor =
- SharedStorageOperation(optional SharedStorageRunOperationMethodOptions options);
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageOperation {
-};
-
-dictionary SharedStorageRunOperationMethodOptions {
- object data;
- boolean resolveToConfig = false;
- boolean keepAlive = false;
-};
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageRunOperation : SharedStorageOperation {
- Promise<undefined> run(object data);
-};
-
-[Exposed=SharedStorageWorklet]
-interface SharedStorageSelectURLOperation : SharedStorageOperation {
- Promise<long> run(object data,
- FrozenArray<SharedStorageUrlWithMetadata> urls);
+dictionary SharedStorageUrlWithMetadata {
+ required USVString url;
+ object reportingMetadata;
};
[Exposed=(Window,SharedStorageWorklet)]
@@ -54,22 +44,23 @@ dictionary SharedStorageSetMethodOptions {
boolean ignoreIfPresent = false;
};
-typedef (USVString or FencedFrameConfig) SharedStorageResponse;
-
[Exposed=(Window)]
interface WindowSharedStorage : SharedStorage {
- Promise<any> run(DOMString name,
- optional SharedStorageRunOperationMethodOptions options = {});
Promise<SharedStorageResponse> selectURL(DOMString name,
FrozenArray<SharedStorageUrlWithMetadata> urls,
optional SharedStorageRunOperationMethodOptions options = {});
+ Promise<any> run(DOMString name,
+ optional SharedStorageRunOperationMethodOptions options = {});
+
+ Promise<SharedStorageWorklet> createWorklet(USVString moduleURL, optional WorkletOptions options = {});
readonly attribute SharedStorageWorklet worklet;
};
-dictionary SharedStorageUrlWithMetadata {
- required USVString url;
- object reportingMetadata;
+dictionary SharedStorageRunOperationMethodOptions {
+ object data;
+ boolean resolveToConfig = false;
+ boolean keepAlive = false;
};
partial interface Window {