-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from arichiv/idl
Storage Access IDL
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {}; | ||
``` |