Assuming the Record & Tuple proposal lands in ECMAScript, we should support specifying composite keys with tuples. Namely things like this would be expected to work:
// tuples and arrays are equally valid ways to specify composite keys
assert(indexedDB.cmp([1,2,3], #[1,2,3]) === 0);
// tuples and arrays are interchangeable where keys are used
store.put('value1', #[1,2,3]);
store.put('value2', [4,5,6]);
store.get([1,2,3]).onsuccess = e => { assert(e.target.result === 'value1'; };
store.get(#[4,5,6]).onsuccess = e => { assert(e.target.result === 'value2'; };
// but IndexedDB operations that return composite keys to script still produce arrays
store.put('value', #[1,2,3]).onsuccess = e => { let key = e.target.result; assert(Array.isArray(key)); };
Assuming the Record & Tuple proposal lands in ECMAScript, we should support specifying composite keys with tuples. Namely things like this would be expected to work:
I believe this would only require normative changes in https://w3c.github.io/IndexedDB/#convert-value-to-key and an non-normative changes in https://w3c.github.io/IndexedDB/#key-construct