    };
                request.onerror = function(e) {
                    reject(new Error("IDB request failed: " + e.target.error.message));
                    Promise.flushQueue && Promise.flushQueue();
                };
            });
        }

        async function main() {
            try {
                let storage = new Storage("idb-promises");
                await storage.open();
                //await reqAsPromise(storage.openTxn("readwrite", "foos").objectStore("foos").clear());

       