The initial proposal for IndexedDB dates back to 2010 (current) and appeared in browsers around 2011/12. For performance reasons early on it was decided to make the interface asynchronous. But native promises only became available in browsers around 2014. So the IndexedDB interface was designed around events - as in the response to a request was an event that needed to be processed by an event handler.
IndexedDB 2.0 hasn't change that. IDB is a thin wrapper around the IndexedDB event-based interface which promisifies it - i.e. with IDB promises and async/await can be used with IndexedDB.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Are performances not better ?
The initial proposal for IndexedDB dates back to 2010 (current) and appeared in browsers around 2011/12. For performance reasons early on it was decided to make the interface asynchronous. But native promises only became available in browsers around 2014. So the IndexedDB interface was designed around events - as in the response to a request was an event that needed to be processed by an event handler.
IndexedDB 2.0 hasn't change that. IDB is a thin wrapper around the IndexedDB event-based interface which promisifies it - i.e. with IDB promises and async/await can be used with IndexedDB.