- From: Joshua Bell <notifications@github.com>
- Date: Wed, 20 Nov 2019 13:16:37 -0800
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 20 November 2019 21:16:39 UTC
I noticed that this throws in both Chrome and Firefox: ```js const k = [1,2,3]; const p = new Proxy(k, {}); indexedDB.cmp(k, p); ``` In Chrome, at least, the proxy fails an internal "is this an array?" check. In the spec [convert a value to a key](https://w3c.github.io/IndexedDB/#convert-value-to-key) calls ECMAScript's [IsArray](https://tc39.es/ecma262/#sec-isarray) which would seem to return true for array proxies. At the very least, we don't have tests. Should we update the spec to exclude proxies, e.g. replacing _"if IsArray(input)"_ with _"if input is an Array exotic object"_? Alternately, should array proxies be supported? What are the consequences of allowing these? Would the value→key conversion algorithm potentially blow up in more places? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/IndexedDB/issues/309
Received on Wednesday, 20 November 2019 21:16:39 UTC