blob: 5bd641784b3d0011e7177b14fd71e84b798a94ad [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/ServiceWorker/#cachestorage-interface
[
ActiveScriptWrappable,
SecureContext,
Exposed=(Window,Worker)
] interface CacheStorage {
[CallWith=ScriptState, MeasureAs=CacheStorageRead, RaisesException]
Promise<any> match(RequestInfo request,
optional MultiCacheQueryOptions options = {});
[CallWith=ScriptState, MeasureAs=CacheStorageRead]
Promise<boolean> has(DOMString cacheName);
[CallWith=ScriptState] Promise<Cache> open(DOMString cacheName);
[CallWith=ScriptState, MeasureAs=CacheStorageWrite, ImplementedAs=Delete]
Promise<boolean> delete(DOMString cacheName);
[CallWith=ScriptState, MeasureAs=CacheStorageRead]
Promise<sequence<DOMString>> keys();
};