Skip to content

Commit

Permalink
Merge pull request #3 from arichiv/idl
Browse files Browse the repository at this point in the history
Storage Access IDL
  • Loading branch information
johannhof authored Nov 6, 2023
2 parents c4cbb5b + a85f261 commit 9df8bc0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions idl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
```
partial interface Document {
Promise<StorageAccessHandle> 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<StorageEstimate> estimate();
Promise<boolean> persisted();
Promise<boolean> persist();
readonly attribute Storage sessionStorage;
readonly attribute Storage localStorage;
readonly attribute IDBFactory indexedDB;
readonly attribute LockManager locks;
readonly attribute CacheStorage caches;
Promise<FileSystemDirectoryHandle> getDirectory();
DOMString createObjectURL((Blob or MediaSource) obj);
undefined revokeObjectURL(DOMString url);
};
[Exposed=StorageAccessHandle]
partial interface BroadcastChannel {};
[Exposed=StorageAccessHandle]
partial interface SharedWorker {};
```

0 comments on commit 9df8bc0

Please sign in to comment.