requestonsuccess
Request.onsuccess is a callback property of the IDBRequest interface used in the IndexedDB API to handle the successful completion of a database operation. It is commonly assigned to respond to operations such as add, put, delete, get, or cursor-related requests. When the operation completes without error, the onsuccess handler is invoked with an event object.
Within the onsuccess handler, the result of the operation can be accessed via event.target.result (or via request.result
The request.onsuccess handler can be defined in two common ways: by assigning a function directly to the
Compatibility and behavior: onsuccess is part of the standard IndexedDB API and is supported in major browsers.