blob: 3cbd16e9c3964979ce2d5a8d301a5b613ae14191 [file] [log] [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://github.com/WICG/storage-buckets
[
ActiveScriptWrappable,
RuntimeEnabled=StorageBuckets,
Exposed=(Window,Worker),
SecureContext
] interface StorageBucket {
[Exposed=Window, CallWith=ScriptState] Promise<boolean> persist();
[CallWith=ScriptState] Promise<boolean> persisted();
[CallWith=ScriptState] Promise<StorageEstimate> estimate();
[CallWith=ScriptState] Promise<StorageBucketDurability> durability();
[CallWith=ScriptState] Promise<void> setExpires(DOMHighResTimeStamp expires);
[CallWith=ScriptState] Promise<DOMHighResTimeStamp?> expires();
[SameObject] readonly attribute IDBFactory indexedDB;
[SameObject] readonly attribute LockManager locks;
[SameObject, RaisesException] readonly attribute CacheStorage caches;
[CallWith=ScriptState, RaisesException] Promise<FileSystemDirectoryHandle> getDirectory();
};