IDBCursor.webidl (1266B)
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/#cursor-interface 8 */ 9 10 enum IDBCursorDirection { 11 "next", 12 "nextunique", 13 "prev", 14 "prevunique" 15 }; 16 17 [Exposed=(Window,Worker)] 18 interface IDBCursor { 19 readonly attribute (IDBObjectStore or IDBIndex) source; 20 21 [BinaryName="getDirection"] 22 readonly attribute IDBCursorDirection direction; 23 24 [Pure, Throws] readonly attribute any key; 25 [Pure, Throws] readonly attribute any primaryKey; 26 [SameObject] readonly attribute IDBRequest request; 27 28 [Throws] 29 undefined advance ([EnforceRange] unsigned long count); 30 31 [Throws] 32 undefined continue (optional any key); 33 34 [Throws] 35 undefined continuePrimaryKey(any key, any primaryKey); 36 37 [NewObject, Throws] IDBRequest update(any value); 38 [NewObject, Throws] IDBRequest delete(); 39 }; 40 41 [Exposed=(Window,Worker)] 42 interface IDBCursorWithValue : IDBCursor { 43 [Pure, Throws] readonly attribute any value; 44 };