chromium/third_party/blink/renderer/modules/shared_storage/shared_storage_worklet_global_scope.idl

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

[
  Global=SharedStorageWorklet,
  Exposed=SharedStorageWorklet
]
interface SharedStorageWorkletGlobalScope : WorkletGlobalScope {
  [
    ImplementedAs=Register,
    RaisesException
  ] void register(DOMString name, NoArgumentConstructor operationCtor);

  [CallWith=ScriptState, RaisesException]
  readonly attribute SharedStorage sharedStorage;

  [
    CallWith=ScriptState,
    RaisesException,
    ContextEnabled=PrivateAggregationInSharedStorage
  ]
  readonly attribute PrivateAggregation privateAggregation;

  [
    CallWith=ScriptState,
    RaisesException
  ]
  readonly attribute Crypto crypto;
};

callback RunFunctionForSharedStorageSelectURLOperation =
    Promise<any>(sequence<DOMString> urls, optional any data);

callback RunFunctionForSharedStorageRunOperation =
    Promise<any>(optional any data);