Re: [w3c/IndexedDB] Key Paths: Support iteration step operator (#35)

mediaformat left a comment (w3c/IndexedDB#35)

I see this was tagged, was there any discussion of this at TPAC2024?

> What are the associated edge cases if we allowed the proposed syntax: `"a.b[].c"` ? What does the grammar look like? Is `"a[][]"` valid? (yes?) Is `"[]"` valid? (yes?) Is `"a[]a"` valid? (no?)
> 
> ```
> path := "" | (identifier | iteration) step*
> step ::= "." identifier | iteration 
> iteration ::= "[]"
> identifier ::= IdentifierName /* [ECMA-262] */
> ```
> 
> Parsing then leads to a sequence of (identifier | iteration); https://w3c.github.io/IndexedDB/#dfn-evaluate-a-key-path-on-a-value would need to parse (not just split on "." then iterate), and if an iteration step is hit uses GetMethod(v, @[@iterator](https://github.com/iterator)) / GetIterator() like WebIDL and iterates/recurses, producing a key array.

Any editors want to bring this up at TPAC2026?





-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/35#issuecomment-5753714557
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/issues/35/5753714557@github.com>

Received on Monday, 21 September 2026 00:05:39 UTC