This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

openCursor

Summary

Creates a cursor.

Method of apis/indexeddb/IDBObjectStoreapis/indexeddb/IDBObjectStore

Syntax

var object = object.openCursor(range, direction);

Parameters

range

Data-type
Blob

A key range limiting the cursor to a specific set of values.

direction

Data-type
Blob

Indicates the direction of traversal and whether duplicate values are included.

Return Value

Returns an object of type DOM NodeDOM Node

Notes

Remarks

This method can throw the following DOMException exceptions:

Exception properties Description

name: DataError
The values range parameter are not valid for the data source.

name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)
The object store has been deleted or is otherwise unavailable.

name: TransactionInactiveError
The associated transaction is not active.

Note As of Internet Explorer 10, the code property is deprecated in favor of the name property, which is preferred for standards compliance and future compatibility.

Syntax

Standards information

Attributions