[indexeddb] Using WebIDL Dictionary in IDBObjectStore.createIndex for optionalParameters

Have you considered using the WebIDL dictionary definition as a mechanism to define the optional parameters in the IDBDatabase.createObjectStore method?

Advantages at using the dictionary definition on WebIDL for optional parameters:
. Provides a fixed, ordered set of key-value pairs
. Removes the need to walk the hierarchy chain to determine if these attributes are available
. Provides default values for each of its key-value pairs
. Enables an extensible pattern to add new capabilities in the future

I believe this will change our current method definition to the following:

dictionary IDBOptionalParameters {
   DOMString? keyPath = null;
   boolean? autoIncrement = false;
};

IDBIndex   createIndex (in DOMString name, in DOMString keyPath, in optional IDBOptionalParameters optionalParameters) raises (IDBDatabaseException);

Israel

Received on Monday, 6 June 2011 19:03:42 UTC