blob: bc2899bb4fc7eed67d2b76e7b83e3ec7c9c0dd60 [file] [log] [blame]
// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports)
// Source: Cookie Store API (https://wicg.github.io/cookie-store/)
[Exposed=(ServiceWorker,Window),
SecureContext]
interface CookieStore : EventTarget {
Promise<CookieListItem?> get(USVString name);
Promise<CookieListItem?> get(optional CookieStoreGetOptions options = {});
Promise<CookieList> getAll(USVString name);
Promise<CookieList> getAll(optional CookieStoreGetOptions options = {});
Promise<void> set(USVString name, USVString value);
Promise<void> set(CookieInit options);
Promise<void> delete(USVString name);
Promise<void> delete(CookieStoreDeleteOptions options);
[Exposed=Window]
attribute EventHandler onchange;
};
enum CookieMatchType {
"equals",
"starts-with"
};
dictionary CookieStoreGetOptions {
USVString name;
USVString url;
CookieMatchType matchType = "equals";
};
enum CookieSameSite {
"strict",
"lax",
"none"
};
dictionary CookieInit {
required USVString name;
required USVString value;
DOMTimeStamp? expires = null;
USVString? domain = null;
USVString path = "/";
CookieSameSite sameSite = "strict";
};
dictionary CookieStoreDeleteOptions {
required USVString name;
USVString? domain = null;
USVString path = "/";
};
dictionary CookieListItem {
USVString name;
USVString value;
USVString? domain;
USVString path;
DOMTimeStamp? expires;
boolean secure;
CookieSameSite sameSite;
};
typedef sequence<CookieListItem> CookieList;
[Exposed=(ServiceWorker,Window),
SecureContext]
interface CookieStoreManager {
Promise<void> subscribe(sequence<CookieStoreGetOptions> subscriptions);
Promise<sequence<CookieStoreGetOptions>> getSubscriptions();
Promise<void> unsubscribe(sequence<CookieStoreGetOptions> subscriptions);
};
[Exposed=(ServiceWorker,Window)]
partial interface ServiceWorkerRegistration {
readonly attribute CookieStoreManager cookies;
};
[Exposed=Window,
SecureContext]
interface CookieChangeEvent : Event {
constructor(DOMString type, optional CookieChangeEventInit eventInitDict = {});
readonly attribute CookieList changed;
readonly attribute CookieList deleted;
};
dictionary CookieChangeEventInit : EventInit {
CookieList changed;
CookieList deleted;
};
[Exposed=ServiceWorker]
interface ExtendableCookieChangeEvent : ExtendableEvent {
constructor(DOMString type, optional ExtendableCookieChangeEventInit eventInitDict = {});
readonly attribute CookieList changed;
readonly attribute CookieList deleted;
};
dictionary ExtendableCookieChangeEventInit : ExtendableEventInit {
CookieList changed;
CookieList deleted;
};
[SecureContext]
partial interface Window {
[Replaceable, SameObject] readonly attribute CookieStore cookieStore;
};
partial interface ServiceWorkerGlobalScope {
[Replaceable, SameObject] readonly attribute CookieStore cookieStore;
attribute EventHandler oncookiechange;
};