blob: 157cb7b1a22cb30cae9b2c1c37fb44e408136176 [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
[
RuntimeEnabled=StorageBuckets,
Exposed=(Window,Worker),
SecureContext
] interface StorageBucket {
readonly attribute DOMString name;
[Exposed=Window, CallWith=ScriptState, Measure] Promise<boolean> persist();
[CallWith=ScriptState, Measure] Promise<boolean> persisted();
[CallWith=ScriptState, Measure] Promise<StorageEstimate> estimate();
[CallWith=ScriptState, Measure] Promise<StorageBucketDurability> durability();
[CallWith=ScriptState, Measure] Promise<void> setExpires(DOMHighResTimeStamp expires);
[CallWith=ScriptState, Measure] Promise<DOMHighResTimeStamp?> expires();
[SameObject, Measure] readonly attribute IDBFactory indexedDB;
[SameObject, RuntimeEnabled=StorageBucketsLocks, Measure] readonly attribute LockManager locks;
[SameObject, RaisesException, Measure] readonly attribute CacheStorage caches;
[CallWith=ScriptState, RaisesException, Measure] Promise<FileSystemDirectoryHandle> getDirectory();
};