Created attachment 96490 [details] test case http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#options-object-concept states "if any attribute has a getter function or its value is an object, a NOT_TRANSIENT_ERR exception must be thrown." To test this, I create a new Boolean object and use it in the options object when creating an objectstore. According to the above spec text, this should throw. Expected behavior: throw webkitIDBDatabaseException.NON_TRANSIENT_ERR Actual behavior: object store created, no exception thrown Test case attached.
The IndexedDB spec is changing to use the (new) WebIDL "dictionary" type for the option objects, and that text has been removed. My reading of WebIDL [1] and ES5 [2] is that: * Only dictionary members mentioned in the IDL are considered; ergo, extra properties on the JS object are ignored. * The [[Get]] internal method will call a getter (ES5 8.12.3) so this should be valid: db.createObjectStore('my-name', { get keyPath() { return 'my.path'; }, get autoIncrement() { return true; }, ignore_other_properties: {}, even_funky_stuff_like: document }); ... and this appears to work in Chrome 15. [1] http://dev.w3.org/2006/webapi/WebIDL/#es-dictionary [2] http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf So, marking this as invalid, although there may be some additional edge cases to consider.