Bug 1614879 [wpt PR 21750] - Set request mode for beacon request with non-cors-safeli...
[gecko.git] / dom / webidl / IDBFactory.webidl
blob57826b231728d64c7ff952904d95c1941b929a5f
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://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 interface Principal;
15 dictionary IDBOpenDBOptions
17   [EnforceRange] unsigned long long version;
18   StorageType storage;
21 /**
22  * Interface that defines the indexedDB property on a window.  See
23  * http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
24  * for more information.
25  */
26 [Exposed=(Window,Worker)]
27 interface IDBFactory {
28   [Throws, NeedsCallerType]
29   IDBOpenDBRequest
30   open(DOMString name,
31        [EnforceRange] unsigned long long version);
33   [Throws, NeedsCallerType]
34   IDBOpenDBRequest
35   open(DOMString name,
36        optional IDBOpenDBOptions options = {});
38   [Throws, NeedsCallerType]
39   IDBOpenDBRequest
40   deleteDatabase(DOMString name,
41                  optional IDBOpenDBOptions options = {});
43   [Throws]
44   short
45   cmp(any first,
46       any second);
48   [Throws, ChromeOnly, NeedsCallerType]
49   IDBOpenDBRequest
50   openForPrincipal(Principal principal,
51                    DOMString name,
52                    [EnforceRange] unsigned long long version);
54   [Throws, ChromeOnly, NeedsCallerType]
55   IDBOpenDBRequest
56   openForPrincipal(Principal principal,
57                    DOMString name,
58                    optional IDBOpenDBOptions options = {});
60   [Throws, ChromeOnly, NeedsCallerType]
61   IDBOpenDBRequest
62   deleteForPrincipal(Principal principal,
63                      DOMString name,
64                      optional IDBOpenDBOptions options = {});