[indexeddb] openCursor optional parameters issue

The IDBObjectStore.openCursor method is defined to have two optional parameters:
* IDBRequest openCursor (in optional any range, in optional unsigned short direction) raises (IDBDatabaseException);

Based on the examples in the spec, it seems we're envisioning the method to be used in the following ways:
* objStore.openCursor();
* objStore.openCursor(keyRange);
* objStore.openCursor(keyRange, IDBCursor.PREV);
* objStore.openCursor(IDBCursor.PREV);

Having "any" for the keyRange type makes it difficult to detect the correct overloaded parameter for openCursor.

In looking at IDBIndex.openCursor the range parameter has a different type, IDBKeyRange.  This seems to be the correct type we should be using in IDBObjectStore.openCursor:
* IDBRequest openCursor (in optional IDBKeyRange range, in optional unsigned short direction) raises (IDBDatabaseException);

If you agree, I can work with Eliot to make this change in the spec.

Israel

Received on Monday, 27 June 2011 18:43:06 UTC