// The Shared Storage API. // https://github.com/pythagoraskitty/shared-storage/blob/main/README.md [ RuntimeEnabled=SharedStorageAPI, Exposed=(Window, SharedStorageWorklet) ] interface SharedStorage { [Exposed=SharedStorageWorklet] async_iterable; [ CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_Set_Method, DeprecateAs=SharedStorageAPIAll ] Promise set(DOMString key, DOMString value, optional SharedStorageSetMethodOptions options); [ CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_Append_Method, DeprecateAs=SharedStorageAPIAll ] Promise append(DOMString key, DOMString value, optional SharedStorageModifierMethodOptions options); [ CallWith=ScriptState, ImplementedAs=Delete, RaisesException, MeasureAs=SharedStorageAPI_Delete_Method, DeprecateAs=SharedStorageAPIAll ] Promise delete(DOMString key, optional SharedStorageModifierMethodOptions options); [ CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_Clear_Method, DeprecateAs=SharedStorageAPIAll ] Promise clear(optional SharedStorageModifierMethodOptions options); [ RuntimeEnabled=SharedStorageWebLocks, CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_BatchUpdate_Method, DeprecateAs=SharedStorageAPIAll ] Promise batchUpdate(sequence methods, optional SharedStorageModifierMethodOptions options); [ Exposed=SharedStorageWorklet, CallWith=ScriptState, RaisesException, DeprecateAs=SharedStorageAPIAll ] Promise get(DOMString key); [ Exposed=SharedStorageWorklet, CallWith=ScriptState, RaisesException ] Promise length(); [ Exposed=SharedStorageWorklet, CallWith=ScriptState, RaisesException ] Promise remainingBudget(); [ Exposed=SharedStorageWorklet, CallWith=ScriptState, RaisesException ] readonly attribute any context; [ Exposed=Window, CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_SelectURL_Method, DeprecateAs=SharedStorageAPIAll ] Promise selectURL(DOMString name, sequence urls, optional SharedStorageRunOperationMethodOptions options); [ Exposed=Window, CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_Run_Method, DeprecateAs=SharedStorageAPIAll ] Promise run(DOMString name, optional SharedStorageRunOperationMethodOptions options); [ Exposed=Window, CallWith=ScriptState, RaisesException, MeasureAs=SharedStorageAPI_CreateWorklet_Method, DeprecateAs=SharedStorageAPIAll ] Promise createWorklet(USVString moduleURL, optional SharedStorageWorkletOptions options = {}); [ Exposed=Window, CallWith=ScriptState, RaisesException ] readonly attribute SharedStorageWorklet worklet; };