summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/cookie_store/cookie_store.idl
blob: a216eba7960df80b5ec63e1ee451123ebc1af15b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 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://wicg.github.io/cookie-store/explainer.html

[
  Exposed=(ServiceWorker,Window),
  RuntimeEnabled=CookieStore,
  SecureContext
] interface CookieStore : EventTarget {
  // https://wicg.github.io/cookie-store/explainer.html#the-query-api
  [CallWith=ScriptState, Measure, RaisesException] Promise<CookieListItem?> get(
      USVString name);
  [CallWith=ScriptState, Measure, RaisesException] Promise<CookieListItem?> get(
      optional CookieStoreGetOptions options);
  [CallWith=ScriptState, Measure, RaisesException] Promise<CookieList> getAll(
      USVString name);
  [CallWith=ScriptState, Measure, RaisesException] Promise<CookieList> getAll(
      optional CookieStoreGetOptions options);

  // https://wicg.github.io/cookie-store/explainer.html#the-modifications-api
  [CallWith=ScriptState, Measure, RaisesException] Promise<void> set(
      USVString name, USVString value, optional CookieStoreSetOptions options);
  [CallWith=ScriptState, Measure, RaisesException] Promise<void> set(
      CookieStoreSetExtraOptions options);
  [CallWith=ScriptState, ImplementedAs=Delete, Measure, RaisesException]
  Promise<void> delete(USVString name);
  [CallWith=ScriptState, ImplementedAs=Delete, Measure, RaisesException]
  Promise<void> delete(CookieStoreDeleteOptions options);

  // https://wicg.github.io/cookie-store/explainer.html#the-change-events-api
  [Exposed=Window] attribute EventHandler onchange;
};