- From: Pascal666 <notifications@github.com>
- Date: Wed, 21 Mar 2018 16:09:29 -0700
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 21 March 2018 23:10:30 UTC
Thank you. The pattern I normally see is something like:
```
var request = store.get(12345);
request.onsuccess = function() { <do something> };
```
Because the request is handled asynchronously, it is possible for the request to complete before the above event handler gets registered, yes? I don't see how to register an event handler for a request before the request is created, so does this not create a race condition? If the request completes before the event handler is registered then you are saying the event handler will never fire?
--
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/233#issuecomment-375125519
Received on Wednesday, 21 March 2018 23:10:30 UTC