Using event registration for IndexedDB API callbacks