tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cookiestore.idl (3019B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Cookie Store API Standard (https://cookiestore.spec.whatwg.org/)
      5 
      6 [Exposed=(ServiceWorker,Window),
      7 SecureContext]
      8 interface CookieStore : EventTarget {
      9  Promise<CookieListItem?> get(USVString name);
     10  Promise<CookieListItem?> get(optional CookieStoreGetOptions options = {});
     11 
     12  Promise<CookieList> getAll(USVString name);
     13  Promise<CookieList> getAll(optional CookieStoreGetOptions options = {});
     14 
     15  Promise<undefined> set(USVString name, USVString value);
     16  Promise<undefined> set(CookieInit options);
     17 
     18  Promise<undefined> delete(USVString name);
     19  Promise<undefined> delete(CookieStoreDeleteOptions options);
     20 
     21  [Exposed=Window]
     22  attribute EventHandler onchange;
     23 };
     24 
     25 dictionary CookieStoreGetOptions {
     26  USVString name;
     27  USVString url;
     28 };
     29 
     30 enum CookieSameSite {
     31  "strict",
     32  "lax",
     33  "none"
     34 };
     35 
     36 dictionary CookieInit {
     37  required USVString name;
     38  required USVString value;
     39  DOMHighResTimeStamp? expires = null;
     40  USVString? domain = null;
     41  USVString path = "/";
     42  CookieSameSite sameSite = "strict";
     43  boolean partitioned = false;
     44  long long? maxAge = null;
     45 };
     46 
     47 dictionary CookieStoreDeleteOptions {
     48  required USVString name;
     49  USVString? domain = null;
     50  USVString path = "/";
     51  boolean partitioned = false;
     52 };
     53 
     54 dictionary CookieListItem {
     55  USVString name;
     56  USVString value;
     57 };
     58 
     59 typedef sequence<CookieListItem> CookieList;
     60 
     61 [Exposed=(ServiceWorker,Window),
     62 SecureContext]
     63 interface CookieStoreManager {
     64  Promise<undefined> subscribe(sequence<CookieStoreGetOptions> subscriptions);
     65  Promise<sequence<CookieStoreGetOptions>> getSubscriptions();
     66  Promise<undefined> unsubscribe(sequence<CookieStoreGetOptions> subscriptions);
     67 };
     68 
     69 [Exposed=(ServiceWorker,Window)]
     70 partial interface ServiceWorkerRegistration {
     71  [SameObject] readonly attribute CookieStoreManager cookies;
     72 };
     73 
     74 [Exposed=Window,
     75 SecureContext]
     76 interface CookieChangeEvent : Event {
     77  constructor(DOMString type, optional CookieChangeEventInit eventInitDict = {});
     78  [SameObject] readonly attribute FrozenArray<CookieListItem> changed;
     79  [SameObject] readonly attribute FrozenArray<CookieListItem> deleted;
     80 };
     81 
     82 dictionary CookieChangeEventInit : EventInit {
     83  CookieList changed;
     84  CookieList deleted;
     85 };
     86 
     87 [Exposed=ServiceWorker]
     88 interface ExtendableCookieChangeEvent : ExtendableEvent {
     89  constructor(DOMString type, optional ExtendableCookieChangeEventInit eventInitDict = {});
     90  [SameObject] readonly attribute FrozenArray<CookieListItem> changed;
     91  [SameObject] readonly attribute FrozenArray<CookieListItem> deleted;
     92 };
     93 
     94 dictionary ExtendableCookieChangeEventInit : ExtendableEventInit {
     95  CookieList changed;
     96  CookieList deleted;
     97 };
     98 
     99 [SecureContext]
    100 partial interface Window {
    101  [SameObject] readonly attribute CookieStore cookieStore;
    102 };
    103 
    104 partial interface ServiceWorkerGlobalScope {
    105  [SameObject] readonly attribute CookieStore cookieStore;
    106 
    107  attribute EventHandler oncookiechange;
    108 };