This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The IDB spec could be simplified by adding: typedef (DOMString or sequence<DOMString>) IDBKeyPath; And then using it in a handful of places: interface IDBObjectStore { readonly attribute IDBKeyPath? keyPath; // replacing 'any' IDBIndex createIndex (DOMString name, IDBKeyPath keyPath, optional IDBIndexParameters optionalParameters); // replacing explicit union } dictionary IDBObjectStoreParameters { IDBKeyPath? keyPath = null; // replacing explicit union }; interface IDBIndex { readonly attribute IDBKeyPath keyPath; // replacing 'any' } This would not change the defined behavior at all.
Per WebIDL, `sequence<Foo>` can't be used as an attribute/const/etc type. It's only valid as an argument type or a return type.
*sigh* Right. May be why we didn't do this earlier. We could use two different typedefs, (DOMString or sequence<DOMString>) for the operation params and (DOMString or DOMString[]) for the readonly attributes. Kinda lame, though. Not very important anyway; I'll probably punt this unless someone else feels passionate about it.