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

2011-07-11 Thread Eliot Graff
Sicking; timeless; public-webapps@w3.org Subject: RE: [indexeddb] Using WebIDL Dictionary in IDBObjectStore.createIndex for optionalParameters On Thursday, June 16, 2011 3:09 PM, Cameron McCormack wrote: Israel Hilerio: Great! I will work with Eliot to update the spec for the two APIs

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

2011-06-16 Thread Israel Hilerio
On Monday, June 13, 2011 1:17 PM, Jonas Sicking wrote: On Mon, Jun 13, 2011 at 1:00 PM, Israel Hilerio isra...@microsoft.com wrote: On Tuesday, June 07, 2011 4:53 PM, Cameron McCormack wrote: timeless: would having a field: mandatory which indicates which arguments (or feature names)

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

2011-06-16 Thread Cameron McCormack
Israel Hilerio: Great! I will work with Eliot to update the spec for the two APIs below, including their Synchronous counterparts, with: --- dictionary IDBDatabaseOptionalParameters { DOMString keyPath = null; That would need to be DOMString? keyPath = null; (or else just write

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

2011-06-16 Thread Israel Hilerio
On Thursday, June 16, 2011 3:09 PM, Cameron McCormack wrote: Israel Hilerio: Great! I will work with Eliot to update the spec for the two APIs below, including their Synchronous counterparts, with: --- dictionary IDBDatabaseOptionalParameters { DOMString keyPath = null; That

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

2011-06-13 Thread Israel Hilerio
On Tuesday, June 07, 2011 4:53 PM, Cameron McCormack wrote: timeless: would having a field: mandatory which indicates which arguments (or feature names) must be supported by the implementation assuage your concern? createObjectStore(car, { mandatory: [foreignKeys], keyPath: id,

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

2011-06-13 Thread Jonas Sicking
On Mon, Jun 13, 2011 at 1:00 PM, Israel Hilerio isra...@microsoft.com wrote: On Tuesday, June 07, 2011 4:53 PM, Cameron McCormack wrote: timeless: would having a field: mandatory which indicates which arguments (or feature names) must be supported by the implementation assuage your concern?

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

2011-06-13 Thread Shawn Wilsher
On 6/6/2011 12:03 PM, Israel Hilerio wrote: Have you considered using the WebIDL dictionary definition as a mechanism to define the optional parameters in the IDBDatabase.createObjectStore method? I don't believe this was available when we added this. Changing this seems sensible to me.

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

2011-06-13 Thread timeless
On Mon, Jun 13, 2011 at 4:00 PM, Israel Hilerio isra...@microsoft.com wrote: Is this what you were thinking? yes

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

2011-06-07 Thread Israel Hilerio
On Monday, June 06, 2011 3:25 PM, Cameron McCormack wrote: Jonas Sicking: I don't know about other APIs. But it does seem very unfortunate to simply silently ignore unknown arguments to IDBDatabase.createObjectStore. Though then again, extra (and thus unknown) arguments are ignored to all

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

2011-06-07 Thread Jonas Sicking
On Tue, Jun 7, 2011 at 11:26 AM, Israel Hilerio isra...@microsoft.com wrote: On Monday, June 06, 2011 3:25 PM, Cameron McCormack wrote: Jonas Sicking: I don't know about other APIs. But it does seem very unfortunate to simply silently ignore unknown arguments to

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

2011-06-07 Thread timeless
On Tue, Jun 7, 2011 at 5:03 PM, Jonas Sicking jo...@sicking.cc wrote: For example, say that we in version 2 of indexedDB add support for foreign keys. So that you can say: createObjectStore(car, { keyPath: id, foreignKeys: [{keyPath: brand, objectStore: car-brands}]); It seems bad that if a

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

2011-06-07 Thread Cameron McCormack
timeless: would having a field: mandatory which indicates which arguments (or feature names) must be supported by the implementation assuage your concern? createObjectStore(car, { mandatory: [foreignKeys], keyPath: id, foreignKeys: [{keyPath: brand, objectStore: car-brands}]); Certainly

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

2011-06-06 Thread Israel Hilerio
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

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

2011-06-06 Thread Jonas Sicking
On Mon, Jun 6, 2011 at 12:03 PM, Israel Hilerio isra...@microsoft.com wrote: 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

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

2011-06-06 Thread Cameron McCormack
Jonas Sicking: The one outstanding issue that I know about is that we want IndexedDB to throw if any unknown parameters are specified. I don't know if WebIDL dictionaries support those yet. Or if it's something that we can specify in prose. I was waiting to see if anyone else had any views on

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

2011-06-06 Thread Jonas Sicking
On Mon, Jun 6, 2011 at 2:15 PM, Cameron McCormack c...@mcc.id.au wrote: Jonas Sicking: The one outstanding issue that I know about is that we want IndexedDB to throw if any unknown parameters are specified. I don't know if WebIDL dictionaries support those yet. Or if it's something that we

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

2011-06-06 Thread Cameron McCormack
Jonas Sicking: I don't know about other APIs. But it does seem very unfortunate to simply silently ignore unknown arguments to IDBDatabase.createObjectStore. Though then again, extra (and thus unknown) arguments are ignored to all other DOM calls. Right (not as defined in Web IDL at the