Gets a cached IndexedDB connection or creates a new one. Reuses existing instance if already open. Sets up automatic cleanup on beforeunload and close events.
Promise that resolves with the IDBDatabase instance
If database opening fails
Gets a cached IndexedDB connection or creates a new one. Reuses existing instance if already open. Sets up automatic cleanup on beforeunload and close events.