From a85f261a8f0e632c26334a9e2079970b6e77dc42 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 31 Oct 2023 11:01:33 -0400 Subject: [PATCH] Storage Access IDL Here's some draft IDL for review --- idl.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 idl.md diff --git a/idl.md b/idl.md new file mode 100644 index 0000000..b608295 --- /dev/null +++ b/idl.md @@ -0,0 +1,42 @@ +``` +partial interface Document { + Promise requestStorageAccess(StorageAccessTypes types); +}; + +dictionary StorageAccessTypes { + boolean all = false; + boolean estimate = false; + boolean persisted = false; + boolean persist = false; + boolean sessionStorage = false; + boolean localStorage = false; + boolean indexedDB = false; + boolean locks = false; + boolean caches = false; + boolean getDirectory = false; + boolean createObjectURL = false; + boolean revokeObjectURL = false; + boolean BroadcastChannel = false; + boolean SharedWorker = false; +}; + +interface StorageAccessHandle { + Promise estimate(); + Promise persisted(); + Promise persist(); + readonly attribute Storage sessionStorage; + readonly attribute Storage localStorage; + readonly attribute IDBFactory indexedDB; + readonly attribute LockManager locks; + readonly attribute CacheStorage caches; + Promise getDirectory(); + DOMString createObjectURL((Blob or MediaSource) obj); + undefined revokeObjectURL(DOMString url); +}; + +[Exposed=StorageAccessHandle] +partial interface BroadcastChannel {}; + +[Exposed=StorageAccessHandle] +partial interface SharedWorker {}; +```