tor-browser

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

IDBFactory.webidl (1867B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * https://w3c.github.io/IndexedDB/#factory-interface
      8 *
      9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
     10 * liability, trademark and document use rules apply.
     11 */
     12 
     13 interface Principal;
     14 
     15 dictionary IDBOpenDBOptions
     16 {
     17  [EnforceRange] unsigned long long version;
     18 };
     19 
     20 /**
     21 * Interface that defines the indexedDB property on a window.  See
     22 * https://w3c.github.io/IndexedDB/#idbfactory
     23 * for more information.
     24 */
     25 [Exposed=(Window,Worker)]
     26 interface IDBFactory {
     27  [NewObject, Throws, NeedsCallerType]
     28  IDBOpenDBRequest
     29  open(DOMString name,
     30       optional [EnforceRange] unsigned long long version);
     31 
     32  [NewObject, Throws, NeedsCallerType]
     33  IDBOpenDBRequest
     34  deleteDatabase(DOMString name);
     35 
     36  [Throws]
     37  Promise<sequence<IDBDatabaseInfo>> databases();
     38 
     39  [Throws]
     40  short
     41  cmp(any first,
     42      any second);
     43 
     44  [NewObject, Throws, ChromeOnly, NeedsCallerType]
     45  IDBOpenDBRequest
     46  openForPrincipal(Principal principal,
     47                   DOMString name,
     48                   [EnforceRange] unsigned long long version);
     49 
     50  [NewObject, Throws, ChromeOnly, NeedsCallerType]
     51  IDBOpenDBRequest
     52  openForPrincipal(Principal principal,
     53                   DOMString name,
     54                   optional IDBOpenDBOptions options = {});
     55 
     56  [NewObject, Throws, ChromeOnly, NeedsCallerType]
     57  IDBOpenDBRequest
     58  deleteForPrincipal(Principal principal,
     59                     DOMString name,
     60                     optional IDBOpenDBOptions options = {});
     61 };
     62 
     63 dictionary IDBDatabaseInfo {
     64  DOMString name;
     65  unsigned long long version;
     66 };