W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 6 Jun 2011 14:27:01 -0700
Message-ID: <BANLkTi=FCBGmWC5ryB_GzMzqN9d6hE6ghQ@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>, Israel Hilerio <israelh@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>
On Mon, Jun 6, 2011 at 2:15 PM, Cameron McCormack <cam@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
>> can specify in prose.
> I was waiting to see if anyone else had any views on that in the other
> thread, but I guess they donít. :-) †I am still not quite comfortable
> with looking at the enumerability of the property to determine whether
> it will be used as a dictionary member value. †Itís not consistent with
> how property descriptors are handled by Object.defineProperty and it
> doesnít seem like a natural JS usage pattern for objects-as-property-
> bags.

Yeah, I agree that using enumerability is not great.

> Throwing if there are unknown properties is also inconsistent with
> Object.defineProperty. †Do you think this should happen for all users of
> dictionaries (if other specs used them)?

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.

/ Jonas
Received on Monday, 6 June 2011 21:27:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:19 UTC