Re: [w3c/IndexedDB] Cursor property updating precedes success event (#340)

One possible approach:

* Define `IDBCursor` to have internal slots [[key]], [[primaryKey]], [[value]]
* Change the `key`, `primaryKey`, and `value` accessors to return the internal slot values
* Remove the _Set cursor’s got value flag to true_ step from [iterate a cursor](https://w3c.github.io/IndexedDB/#iterate-a-cursor)
* Introduce a set  of substeps in [asynchronously execute a request](https://w3c.github.io/IndexedDB/#asynchronously-execute-a-request) in the "otherwise" block at the end, before the event is fired:
   * If _result_ is a cursor, then:
     * Set _result_.[[key]] to **this**'s **key** (and ditto for primaryKey/value)
     * Set _result_'s **got value flag** to true.

(The wording here suffers a bit due to the lack of distinction between the concept-cursor and IDBCursor.)


-- 
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/340#issuecomment-660306793

Received on Friday, 17 July 2020 19:49:33 UTC