michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStoreParameters michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: interface IDBDatabase : EventTarget { michael@0: readonly attribute DOMString name; michael@0: readonly attribute unsigned long long version; michael@0: michael@0: [Throws] michael@0: readonly attribute DOMStringList objectStoreNames; michael@0: michael@0: [Throws] michael@0: IDBObjectStore createObjectStore (DOMString name, optional IDBObjectStoreParameters optionalParameters); michael@0: michael@0: [Throws] michael@0: void deleteObjectStore (DOMString name); michael@0: michael@0: // This should be: michael@0: // IDBTransaction transaction ((DOMString or sequence) storeNames, optional IDBTransactionMode mode = "readonly"); michael@0: // but unions are not currently supported. michael@0: michael@0: [Throws] michael@0: IDBTransaction transaction (DOMString storeName, optional IDBTransactionMode mode = "readonly"); michael@0: michael@0: [Throws] michael@0: IDBTransaction transaction (sequence storeNames, optional IDBTransactionMode mode = "readonly"); michael@0: michael@0: void close (); michael@0: michael@0: attribute EventHandler onabort; michael@0: attribute EventHandler onerror; michael@0: attribute EventHandler onversionchange; michael@0: }; michael@0: michael@0: partial interface IDBDatabase { michael@0: [Pref="dom.indexedDB.experimental"] michael@0: readonly attribute StorageType storage; michael@0: michael@0: [Throws] michael@0: IDBRequest mozCreateFileHandle (DOMString name, optional DOMString type); michael@0: };